-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue #4735: make RegexpHeaderCheck detect regex having '\n\n' #4768
Conversation
looks like no thing valuable we can add to documentation https://github.com/checkstyle/checkstyle/blob/master/src/xdocs/config_header.xml#L186 it is source of html web site, as it simple bug. |
Codecov Report
@@ Coverage Diff @@
## master #4768 +/- ##
======================================
Coverage 100% 100%
======================================
Files 287 287
Lines 15482 15484 +2
Branches 3514 3515 +1
======================================
+ Hits 15482 15484 +2
Continue to review full report at Codecov.
|
@romani - I get errors when running that regression script -
There's about 8 errors like this. Command I ran -
my-check.xml -
I did not change projects-to-test-on.properties. |
Turned out to be a version mismatch. You can find my test results here. |
Can you elaborate more? You mean a maven version mismatch or something else? |
Please expand testing to all projects. A small test bed is usually not enough to find all the weird quirks and interesting cases. |
@rnveach - yes, it was a maven version mismatch. I was using version 3.2.1. I upgraded to 3.5 and it works now. By all projects you mean uncomment all the projects in |
Yes. |
@rnveach done. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Diff reports are always better place to spot weird stuff
Here it is:
header=^package .\n\n.
Message=Line does not match expected header line of '^$'
It is completely unclear why non specified regexp is used.
We need to document this with example.
Please provide update to documentation file.
@vivekrao1985 , please rebase to resovle conflicts and provide fix for documentation , we are very close to merge. |
Hi, Sorry, got a little busy. I will fix this sometime today. |
94494c0
to
b7aa926
Compare
@romani I have rebased and provided documentation for this change. |
b7aa926
to
1c2deb5
Compare
Looks like wercker build failed. How do I see the results? When I click on Details I get |
This is a issue with wercker. We have no control to give anonymous access.
@timurt @romani This error is happening in master. It was passing before. |
Project chekstyle-tester was updated recently a day ago, |
@vivekrao1985 , wercker fix is merged to master, please rebase on latest master to make all CIs happy. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
items to improve:
@@ -225,7 +225,8 @@ line 14: ^ \*/ | |||
four digit year. Line 5 is an example how to enforce revision | |||
control keywords in a file header. Lines 12-14 is a template for | |||
javadoc (line 13 is so complicated to remove conflict with and of | |||
javadoc comment). | |||
javadoc comment). Lines 7, 9 and 11 will be treated as '^$' and | |||
will forcefully expect the line to be empty. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It will be very useful to users if you put this tiny nuance to header
description the required header specified inline. Individual header lines must be separated by the strin.........
.
please also add that explanation to last example To configure the check to verify that each file starts with the header.
, or create new example. Users like examples more that boring manuals.
1c2deb5
to
8aedcb7
Compare
Rebased and provided examples. |
@rnveach , please do final review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything else looks fine.
<source> | ||
package com.some.package; | ||
|
||
public class ThisWillPass { } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In your before example you had an empty javadoc. In this after example, there is no javadoc.
It is slightly misleading in that it makes it sound like you are forcing users to remove javadoc.
Either
- restore javadoc in after example with empty line after
package
, - or remove it in before example so that
package
andpublic
are on consecutive lines.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense, fixed.
8aedcb7
to
66832a6
Compare
…x having '\n\n'
issue #4735