Android Tools configuration - custom checkstyle.xml
Koen-Kraak opened this issue · 3 comments
Dear reader,
I've tried to setup a custom checkstyle.xml that should be used during pull request.
The documentation states: "If engine is not provided with custom configuration it will use default rule-set. We reserve the right to disable selected rules without notice if necessary."
Also when looking at the issues in a branch and expanding it, it mentions:
"Have your own checkstyle rules? No problem, simply add checkstyle.xml file to the root of this branch."
I've tried placing the checkstyle.xml in various folders but without success. It appears that the default config is still used.
Also when looking at the settings page, it appears to be described that the default one is used, but it does not provides any options to change it:
Could you please provide information about the steps needed to override the default configuration of the checkstyle.xml with my own custom checkstyle.xml?
Thanks in advance!
@Koen-Kraak Hi, please check https://github.com/cordis-dev/cf-checkstyle-test for custom checkstyle.xml
example.
@Koen-Kraak Hi, please check https://github.com/cordis-dev/cf-checkstyle-test for custom
checkstyle.xml
example.
Thanks for your reply,
When I placed the checkstyle.xml
in the root folder op the repository, it still didn't apply that checkstyle.xml
but instead it just used the default.
I verified this by making a pull request to be merged in the branch which has the checkstyle.xml
in the root folder and in that pull request I intentionally added a // TODO: comment.
As can be seen in the default config the TodoComment is a violation that results in the message "Resolve unexpected comment."
In my custom checkstyle there is a different error message, which was not shown in the pull request. Also other violations from my pull request weren't recognized as they are not in the default config.
Could you please validate that the custom checkstyle from https://github.com/cordis-dev/cf-checkstyle-test is respected by the codefactor review when pull request are made to that master branch?
Thanks in advance!
@Koen-Kraak thanks for the details. The config resolution is working. The problem here is that we need more details regarding your repo to resolve this issue but it can't be addressed here due to its private nature.
Could you post directly https://www.codefactor.io/contact and provide branch/PR URLs that are not working as expected?