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

Add new Sevntu checks and create UT for missing checks #3628

Closed
rnveach opened this Issue Dec 9, 2016 · 4 comments

Comments

Projects
None yet
2 participants
@rnveach
Member

rnveach commented Dec 9, 2016

Based on discussion in sevntu-checkstyle/sevntu.checkstyle#557

Checkstyle is missing the following checks from sevntu in it's own sevntu config:

com.github.sevntu.checkstyle.checks.coding.ReturnCountExtendedCheck
com.github.sevntu.checkstyle.checks.design.ConstructorWithoutParamsCheck
com.github.sevntu.checkstyle.checks.coding.AvoidModifiersForTypesCheck
com.github.sevntu.checkstyle.checks.design.HideUtilityClassConstructorCheck

These should be added to our sevntu config.

We also need a new UT that verifies we have all checks in our sevntu configuration file.


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@romani

This comment has been minimized.

Show comment
Hide comment
@romani

romani Dec 9, 2016

Member

we could grab all Check list from http://sevntu-checkstyle.github.io/sevntu.checkstyle/apidocs/allclasses-frame.html
it could be done by shell commands even.

$ xmlstarlet sel --net --template -m .//module -v "@name" -n checkstyle_sevntu_checks.xml | grep -vE "Checker|TreeWalker|Filter|Holder" | sort | uniq | sed "s/Check$//" > file.txt

$ wget -q http://sevntu-checkstyle.github.io/sevntu.checkstyle/apidocs/allclasses-frame.html -O - | html2text | grep -E "Check$" | cut -d " " -f6 | sort | uniq | sed "s/Check$//" > web.txt

$ diff web.txt file.txt 

5d4
< AvoidModifiersForTypes
10d8
< ConstructorWithoutParams
25d22
< HideUtilityClassConstructor
44d40
< ReturnCountExtended

analog of xmlstarlet is grep " <module " checkstyle_sevntu_checks.xml | cut -d "\"" -f2

Member

romani commented Dec 9, 2016

we could grab all Check list from http://sevntu-checkstyle.github.io/sevntu.checkstyle/apidocs/allclasses-frame.html
it could be done by shell commands even.

$ xmlstarlet sel --net --template -m .//module -v "@name" -n checkstyle_sevntu_checks.xml | grep -vE "Checker|TreeWalker|Filter|Holder" | sort | uniq | sed "s/Check$//" > file.txt

$ wget -q http://sevntu-checkstyle.github.io/sevntu.checkstyle/apidocs/allclasses-frame.html -O - | html2text | grep -E "Check$" | cut -d " " -f6 | sort | uniq | sed "s/Check$//" > web.txt

$ diff web.txt file.txt 

5d4
< AvoidModifiersForTypes
10d8
< ConstructorWithoutParams
25d22
< HideUtilityClassConstructor
44d40
< ReturnCountExtended

analog of xmlstarlet is grep " <module " checkstyle_sevntu_checks.xml | cut -d "\"" -f2

@romani

This comment has been minimized.

Show comment
Hide comment
@romani

romani Dec 10, 2016

Member

validation is merged to master and become just another Travis point - 9d90530#diff-354f30a63fb0907d4ad57269548329e3R329

as soon all Checks are activated, it is required to remove | cat in diff command.

Member

romani commented Dec 10, 2016

validation is merged to master and become just another Travis point - 9d90530#diff-354f30a63fb0907d4ad57269548329e3R329

as soon all Checks are activated, it is required to remove | cat in diff command.

romani added a commit that referenced this issue Dec 10, 2016

@romani

This comment has been minimized.

Show comment
Hide comment
@romani

romani Dec 10, 2016

Member

xmlstarlet could be used after update to travis config for apt:

sudo: false
cache:
  apt: true
  directories:
    - ~/.m2/

addons:
  apt:
    packages:
      - xsltproc
      - xmlstarlet

Member

romani commented Dec 10, 2016

xmlstarlet could be used after update to travis config for apt:

sudo: false
cache:
  apt: true
  directories:
    - ~/.m2/

addons:
  apt:
    packages:
      - xsltproc
      - xmlstarlet

romani added a commit that referenced this issue Dec 10, 2016

romani added a commit that referenced this issue Dec 10, 2016

Issue #3628: HideUtilityClassConstructorCheck, AvoidModifiersForTypes…
…Check are used, other are referenced only

romani added a commit that referenced this issue Dec 10, 2016

romani added a commit that referenced this issue Dec 10, 2016

romani added a commit that referenced this issue Dec 10, 2016

@romani romani self-assigned this Dec 10, 2016

romani added a commit that referenced this issue Dec 10, 2016

romani added a commit that referenced this issue Dec 10, 2016

@romani

This comment has been minimized.

Show comment
Hide comment
@romani

romani Dec 10, 2016

Member

all Checks are activated.
Travis validation is activated.

Member

romani commented Dec 10, 2016

all Checks are activated.
Travis validation is activated.

@romani romani closed this Dec 10, 2016

@romani romani added this to the 7.4 milestone Dec 10, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment