Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 08:42

    pbludov on jacoco-660

    Issue #7306: fix RequireThis fo… minor: remove obsolete jacoco s… (compare)

  • 08:41

    pbludov on jacoco-660

    minor: remove obsolete jacoco s… (compare)

  • 08:14

    pbludov on master

    minor: remove obsolete pmd supp… (compare)

  • 05:31

    pbludov on master

    Issue #7299: remove build for o… Issue #6916: migrate integratio… Issue #7117: fix package info j… and 11 more (compare)

  • Dec 06 11:30

    pbludov on issue-6916-misc

    Issue #6916: migrate tests to j… (compare)

  • Dec 06 10:19

    pbludov on issue-6916-ant

    Issue #6916: migrate tests to j… (compare)

  • Dec 06 07:44

    pbludov on issue-6916-ant

    Issue #6916: migrate tests to j… (compare)

  • Dec 06 06:32

    pbludov on issue-6916-ant

    Issue #6916: migrate tests to j… (compare)

  • Dec 06 05:51

    pbludov on issue-6916-checks-metrics

    Issue #6916: migrate tests to j… (compare)

  • Dec 06 05:46

    pbludov on issue-6916-checks-metrics

    Issue #6916: migrate tests to j… (compare)

  • Dec 06 05:36

    pbludov on issue-6916-checks-blocks

    Issue #6916: migrate tests to j… (compare)

  • Dec 06 05:30

    pbludov on issue-6916-checks-blocks

    Issue #7299: remove build for o… Issue #6916: migrate integratio… Issue #7117: fix package info j… and 11 more (compare)

  • Dec 06 05:17

    pbludov on issue-6916-checks-ann

    (compare)

  • Dec 06 04:20

    pbludov on issue-7309-fix-tc-inspections

    (compare)

  • Dec 06 04:17

    pbludov on issue-6916-checks-ann

    Issue #7309: fix teamcity inspe… Issue #7301: fix check for wrap… Issue #6916: migrate tests to j… (compare)

  • Dec 05 11:58

    pbludov on issue-7309-fix-tc-inspections

    Issue #7309: fix teamcity inspe… (compare)

  • Dec 05 11:55

    pbludov on issue-7309-fix-tc-inspections

    Issue #7309: fix teamcity inspe… (compare)

  • Dec 05 10:54

    pbludov on issue-7309-fix-tc-inspections

    Issue #7309: fix teamcity inspe… (compare)

  • Dec 05 02:33

    pbludov on issue-6916-checks-ann

    Revert "config: disable functio… config: fix issue with shippabl… infra: add cat after grep to co… and 4 more (compare)

  • Dec 04 09:19

    pbludov on issue-6916-checks-ann

    Issue #6916: migrate tests to j… (compare)

Roman Ivanov
@romani
we need need somebody to contribute this functionality
there are a lot of talk about this, but do not have enough heads/hands to start working on this
let me know if you are interested to join and start working on this feature
Ullrich Hafner
@uhafner
I can provide a pull request, yes. I already have this code running in my plug-in, would make sense to have it directly in checkstyle. What would be a good package/place for this code?
rnveach
@rnveach
@uhafner start an issue with what you need/want, and formats you would want this to be in, and we'll start talking about the specifics.
Dustin Singleton
@Singleton06
Quick question... We are trying to track the progress of checkstyle reports from one commit to another. We have a nice chunk of technical debt so updating everything right now isn't feasible and one solution we have found is to just commit the report for other tools such as findbugs/spotbugs. The only thing that really changes between builds is the number of issues found, etc, so a new commit would show any newly introduced issues. We were hoping to do this with checkstyles, but it seems that the full path is specified of the file where the violations occur in the report. I wasn't able to find it, but perhaps I'm just missing it. I'd like to change the path of the file to be relative to the build in the report that is produced.
rnveach
@rnveach
@Singleton06 You can set the relative directory by specifying baseDir in the Checker configuration.
See http://checkstyle.sourceforge.net/config.html#Checker_Properties
If everyone's base is different, you can specify it through a system property and have the configuration pick up it's value from there by specifying ${propertyName}.
Dustin Singleton
@Singleton06
Correct me if I'm wrong, but would that require everyone have to specify this property?
Dustin Singleton
@Singleton06
and to clarify, the check is getting performed as desired, I would just like the report to not contain the full path so that the report doesn't change between a run on one machine from another (which do have different bases).
Thanks for the help @rnveach
rnveach
@rnveach
@Singleton06 Yes everyone would have to specify it to give it to the configuration. If your using maven, there may be some magic where it is easier to set it up in the maven config so it happens automatically, but the CLI doesn't know where your base directory is. So someone needs to tell it.
When you say report, do you mean the XML output with -f xml?
Roman Ivanov
@romani
so a new commit would show any newly introduced issues
@Singleton06 , if end up with some solution , it would be awesome if you can share it
A lot of people strugling with incremental checksyle validation enforcement
It might be better to create special Filter in our library that take report from previous execution as suppression file
We even can create new AuditListener that generate suppression xml file based on all violations that are found
Roman Ivanov
@romani
so build on master will generate such artifact file, all PullRequests will use it as base suppression, all new violations will fail a build
If you have time to make it happen, we can switch to issue tracker and discuss details
Dustin Singleton
@Singleton06

@romani - yeah, that's basically what we're doing, with just a bit more of a manual process. We are checking in the violations and then any updates to that file result in a change in SCM, and we call it out on PRs and things like that.

Setting up a file to be a suppression would be a great idea, but I wonder if it's feasible since changing code around something would cause the lines where the violations that occur to be changed.

rnveach
@rnveach
@Singleton06 newer suppressions use xpath instead of line/column, but not all checks support it yet.
Dustin Singleton
@Singleton06

interesting. So you could have a build that produces the "suppression" file that could then be fed back into future builds.

I think this would work well. The only thing that I would say that would beneficial with this is to have some way of notifying if there was an unnecessary suppression. It would help to identify situations where an issue has been fixed but the suppression file wasn't updated.

rnveach
@rnveach
@Singleton06 we have an issue on just that but it requires other pieces in place first
Ullrich Hafner
@uhafner
Wouldn’t it make more sense if this incremental feature is one abstraction higher and not in the CheckStyle library? I have implemented such a feature in Jenkins warnings plugin and it works quite well for CheckStyle (and SpotBugs, PMD, etc.). I.e. the CI tool selects the baseline report that can be used to compare the current results with. The delta algorithm has as input the reports of the baseline and the current build (independent of the used static analysis tool) and is capable of producing a report that identifies new and outstanding warnings.
And one note to checkstyle/checkstyle#3242: it would be quite valuable for my warnings plugin if I can visualize all used suppressions. So if checkstyle suppresses a warning it would be a nice additional feature if that would be part of some (additional and optional) report (PMD does this…)
Dustin Singleton
@Singleton06
Personally, I think I would prefer that it be part of checkstyle. I think that gives more freedom for other tools to make usage of it. We would like to incorporate it into our maven builds, but wouldn't be opposed to also seeing it in jenkins builds, etc, but it's just not our primary use-case.
Ullrich Hafner
@uhafner
I see. Note that the library to create the diff is independent of Jenkins and might be used in a plain maven plugin as well. Otherwise you would reinvent the wheel in CheckStyle (and in every other static analysis tool). And creating the diff is a non trivial task.
Dustin Singleton
@Singleton06
The comparison is not really the part that I'm too interested in. I basically want a way to take a snapshot of the current state of the project and make sure that any additional commits do not worsen the state of the project.
Therefore, if I have a way to output a suppression file that would cause a build of that same project to find no violations, that achieves the goal I'm looking for.
Ullrich Hafner
@uhafner
I understand, this is the simple way to implement such a feature (this is a approach that I started with as well). It is not refactoring-aware but will work in most other cases.
Roman Ivanov
@romani
code freeze for release 8.15 - no merges to master brnach
Roman Ivanov
@romani
Release is done
Jonathan Leitschuh
@JLLeitschuh
@romani Please check the private message I just sent you. I have an urgent issue I need to discusss with you and the checkstyle team privately.
Roman Ivanov
@romani
=======
code freeze .... while I am doing 8.16 release
====
Roman Ivanov
@romani
code freeze for 8.17 release
Roman Ivanov
@romani
Sheng Chen
@jdneo
Hi team, I have a question about the Eclipse Checkstyle plugin. The plugin use ASTVisitor to modify the AST, thus correct the Checkstyle violations. Is it possible to extract these visitors into a separate jar files for distribution? I'm trying to implement a Checkstyle extension in VS Code and I wish I can use these components as part of the dependencies instead of copying the code.
Sheng Chen
@jdneo
demo.gif
Above is the gif of the POC I have implemented for now
rnveach
@rnveach
@jdneo ASTVisitor is not a creation of checkstyle or eclipse-cs. It is made by eclipse and in their jars. You would have to find those and extract them to use them.
Sheng Chen
@jdneo
rnveach
@rnveach
@jdneo Just look at imports and class hierarchy. AbstractASTResolution is eclipse-cs, but it extends WorkbenchMarkerResolution which is eclipse's
Sheng Chen
@jdneo
Okay, maybe I haven't explained my problem clearly. I found that the ASTVisitor return by the method handleGetCorrectingASTVisitor() is very useful. Currently, if I want to implement the same logic, I need to copy the code from handleGetCorrectingASTVisitor(). It would be great if these components could be shared.
rnveach
@rnveach
I'm not seeing what your saying. If you want to use the code, you can include eclipse-cs' JARs and eclipse's JARs and instantiate ASTVisitor and use it as you wish.
vermasoft.com
@ashish2583
i am understanding that what i am doing because i am a new user so i do any thing whos i seen
rnveach
@rnveach
@ashish2583 If you are new to checkstyle and want to contribute, please look at.
http://checkstyle.sourceforge.net/beginning_development.html
http://checkstyle.sourceforge.net/contributing.html