[ 
https://issues.apache.org/jira/browse/MCHECKSTYLE-440?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17752295#comment-17752295
 ] 

Nianjun Sun commented on MCHECKSTYLE-440:
-----------------------------------------

Hi, Michael. I already try to rised up a post in Checkstyle GitHub discussion. 
After read some checkstyle source codes briefly, I think checkstyle team may 
understand how that cache works.

thanks Michael. this ticket should be closed.

> how to reuse the checkstyle cache from a new environment
> --------------------------------------------------------
>
>                 Key: MCHECKSTYLE-440
>                 URL: https://issues.apache.org/jira/browse/MCHECKSTYLE-440
>             Project: Maven Checkstyle Plugin
>          Issue Type: Task
>          Components: checkstyle:check
>    Affects Versions: 3.3.0
>            Reporter: Nianjun Sun
>            Priority: Major
>
> Hi, dear Checkstyle plugin team,
>   
> This is Nianjun from the Apache/ShardingSphere team. Recently, we added the 
> checkstyle:check as required check in our GitHub action. This action is 
> triggered by every single pull request and checks the Java code style for all 
> modules.
>   
> I noticed that running checkstyle:check takes almost 1 minute to check nearly 
> 300 modules.this takes too much time for the reviewer to merge the code. I 
> know that Checkstyle generates a cache file called 'checkstyle-cachefile' in 
> the target folder. So, I tried caching all 'checkstyle-cachefile' files in 
> the target folder by 
> actions/cache@v3 for the next GitHub action run.  
> However, this approach didn't work and I'm not sure how the Checkstyle cache 
> works...
>   
> Interestingly, when I execute the command `mvn checkstyle:check 
> -Dcheckstyle.skip=false -T1C` twice in our GitHub action, it only takes 15 
> seconds on the second run. This makes me think that the cache file is working.
>   
> I also tried downloading these 'checkstyle-cachefile' files from GitHub's 
> cache and putting them in each module's target folder, but it still takes 1 
> minute to complete.
>   
> I'm not sure if 'checkstyle-cachefile' has an expiration period or if it 
> depends on some environment information or something else entirely. Could you 
> please provide some tips or give me a brief description of how 
> 'checkstyle-cachefile' works?
>   
> Thank you!



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to