Fix cache usage in presence of filters #407

Closed
romani opened this Issue Dec 2, 2014 · 2 comments

Comments

Projects
None yet
2 participants
@romani
Member

romani commented Dec 2, 2014

that issue was created base on: #137
That PR was closed as provided implementation is hack, it works, but it is hack.

Problems:
0) Current cache implementation does not consider Filters and any Supporession mechanism of Checkstyle, but it should.

  1. Chache should be validated by date of config and all suppression.xml(external files).

FYI: cache is used to let other tools/plugins cache validation results and skip validation process if file is not changed and it had no violation and config(s) is(are) not changed. That might be a reason of Eclipse-cs doesnot show all violations, and new violations appear after Eclipse restart or on other Eclispe instance.

@romani

This comment has been minimized.

Show comment
Hide comment
@romani

romani Jan 8, 2016

Member

We need to find way to get in to configuration account files of Checkstyle Modules

Example:

  <module name="SuppressionFilter">
    <property name="file" value="${checkstyle.suppressions.file}"/>
  </module>

SuppressionFilter is just another module that have configuration in separate file. Another example: ImportOrder, HeaderCheck, ....(any custom check/module that we do not know)...

So cache need to be somehow invalidated base on modules configurations, Checker need to ask a module about timestamps of external files this module depends on ...(or smth similar).. Module need to return Map of External-Resource-Name and Last-Modification-Timestamp.

Nuance (to recheck): remote resources might not have Last-Modification-Timestamp, class-path(embedded in jar) files , URLs .....

Member

romani commented Jan 8, 2016

We need to find way to get in to configuration account files of Checkstyle Modules

Example:

  <module name="SuppressionFilter">
    <property name="file" value="${checkstyle.suppressions.file}"/>
  </module>

SuppressionFilter is just another module that have configuration in separate file. Another example: ImportOrder, HeaderCheck, ....(any custom check/module that we do not know)...

So cache need to be somehow invalidated base on modules configurations, Checker need to ask a module about timestamps of external files this module depends on ...(or smth similar).. Module need to return Map of External-Resource-Name and Last-Modification-Timestamp.

Nuance (to recheck): remote resources might not have Last-Modification-Timestamp, class-path(embedded in jar) files , URLs .....

@romani romani changed the title from Fix cache usage in TreeWalker in presence of filters. to Fix cache usage in presence of filters. Jan 8, 2016

MEZk added a commit to MEZk/checkstyle that referenced this issue Apr 11, 2016

MEZk added a commit to MEZk/checkstyle that referenced this issue Apr 11, 2016

Issue #407: Fix cache usage in presence of modules which use external…
… resources for configuration (test attempt 1)

MEZk added a commit to MEZk/checkstyle that referenced this issue Apr 17, 2016

MEZk added a commit to MEZk/checkstyle that referenced this issue Apr 17, 2016

MEZk added a commit to MEZk/checkstyle that referenced this issue Apr 17, 2016

MEZk added a commit to MEZk/checkstyle that referenced this issue Apr 17, 2016

MEZk added a commit to MEZk/checkstyle that referenced this issue Apr 21, 2016

MEZk added a commit to MEZk/checkstyle that referenced this issue Apr 23, 2016

MEZk added a commit to MEZk/checkstyle that referenced this issue Apr 23, 2016

MEZk added a commit to MEZk/checkstyle that referenced this issue Apr 24, 2016

MEZk added a commit to MEZk/checkstyle that referenced this issue May 3, 2016

MEZk added a commit to MEZk/checkstyle that referenced this issue May 3, 2016

MEZk added a commit to MEZk/checkstyle that referenced this issue May 5, 2016

MEZk added a commit to MEZk/checkstyle that referenced this issue May 6, 2016

MEZk added a commit to MEZk/checkstyle that referenced this issue May 6, 2016

@romani romani added the new feature label May 7, 2016

MEZk added a commit to MEZk/checkstyle that referenced this issue May 8, 2016

MEZk added a commit to MEZk/checkstyle that referenced this issue May 8, 2016

MEZk added a commit to MEZk/checkstyle that referenced this issue May 9, 2016

MEZk added a commit to MEZk/checkstyle that referenced this issue May 9, 2016

MEZk added a commit to MEZk/checkstyle that referenced this issue May 9, 2016

MEZk added a commit to MEZk/checkstyle that referenced this issue May 9, 2016

MEZk added a commit to MEZk/checkstyle that referenced this issue May 9, 2016

MEZk added a commit to MEZk/checkstyle that referenced this issue May 12, 2016

MEZk added a commit to MEZk/checkstyle that referenced this issue May 15, 2016

MEZk added a commit to MEZk/checkstyle that referenced this issue May 15, 2016

MEZk added a commit to MEZk/checkstyle that referenced this issue May 16, 2016

romani added a commit that referenced this issue May 16, 2016

@romani romani added this to the 6.19 milestone May 16, 2016

@romani

This comment has been minimized.

Show comment
Hide comment
@romani

romani May 16, 2016

Member

fix is merged.

Member

romani commented May 16, 2016

fix is merged.

@romani romani closed this May 16, 2016

@romani romani changed the title from Fix cache usage in presence of filters. to Fix cache usage in presence of filters May 29, 2016

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