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: #7696 update doc for RegexpOnFilename #7953
Issue: #7696 update doc for RegexpOnFilename #7953
Conversation
@DeveloperHB please follow instructions from here https://github.com/checkstyle/checkstyle/wiki/Good-practice-on-how-to-update-examples Update PR description with images and cli outputs |
@timurt @romani I have updated the PR description. I would also like to draw your attention to this. While I was trying different configurations, I found errors in the configurations which contains attribute folderPattern. It was not working as expected. So, I had a look at the Java code in RegexpOnFilename.java file and I found this. Consider this configuration,
Consider this file,
The code which gets the folder pattern of the file is, File file = new File("main_properties.properties");
file.getCanonicalFile().getParent(); Consider java file to be in The return value of the statement So, I recommend to change I am working on windows. So, this can also be problem of operating system. In that case we can perform following change,
It will try to match 0 or more occurrences of the last slash(/ or \). |
If you are referring to the documentation and it gives a
https://github.com/checkstyle/checkstyle/wiki/PR-rules |
Currently there is no documentation available which provides examples for RegexpOnFilename. I have the edited the documentation to provide some examples. When I was trying different configurations, I found this problem. As of my point of view, the configurations mentioned in the documentation contain some error. I also recommend to check this issue with other Windows users. We should also open this as an issue if more users are having same problem.
I already run From the error messages of the check which failed, Please visit below link to see full log of the check. |
What is the status of this PR? |
Sorry, I misunderstood the error message in CI check. As the contents had red background, I understood that as an error. The actual error is in commit message. The CI check gets following commit message,
I only have one commit in the Pull Request. What should be the reason behind this? |
Thank you @wltan . Can you please suggest me a way to remove this? |
https://help.github.com/en/github/committing-changes-to-your-project/changing-a-commit-message You could try the |
5f5a7d9
to
e90d95a
Compare
Thank you @wltan . It worked. Now I am getting this error Here is the link |
@romani I am getting |
cbbd3dd
to
0a7a849
Compare
1e42e2f
to
8b25638
Compare
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:
src/main/java/com/puppycrawl/tools/checkstyle/checks/regexp/RegexpOnFilenameCheck.java
Outdated
Show resolved
Hide resolved
src/main/java/com/puppycrawl/tools/checkstyle/checks/regexp/RegexpOnFilenameCheck.java
Show resolved
Hide resolved
2dde891
to
5b52b56
Compare
Please do not forget to regenerate PR description image on how web page is rendering. Please reply "done" to each point. |
@romani After the changes, the To see the error log, visit this link https://travis-ci.org/github/checkstyle/checkstyle/jobs/677091722 |
Once I solve this error I will update the PR description with new images. |
it is easy to resolve yourself, all is printed in logs output. |
5b52b56
to
6423a8e
Compare
Thank you @romani . It was an extra I would also like you to see this comment #7953 (comment). I also recommend the changes described in the comment. |
You can add it to this PR, or better to create new issue and show problem by CLI. |
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.
ok to merge when CI pass.
@DeveloperHB , please move update to trailing *
in folder regexp to separate issue/PR.
It is better to merge this PR sooner.
@romani I suggest to create a new issue for adding trailing |
This is solved. |
Please create issue, as you already have all details. |
@romani When will be the changes reflected in the website https://checkstyle.org/ |
Issue #7696: update doc for RegexpOnFilename
Examples Added:
CLI Results:
For default configuration
config.xml
Results
For custom configurations
config.xml
Results
New Configuration
To configure the check to forbid 'md' files except 'README.md file' in folders, with custom message:
config.xml
Results