You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Nianjun Sun (Jira)" <ji...@apache.org> on 2023/08/08 11:33:00 UTC

[jira] [Updated] (MCHECKSTYLE-440) how to reuse the checkstyle cache from a new environment

     [ https://issues.apache.org/jira/browse/MCHECKSTYLE-440?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Nianjun Sun updated MCHECKSTYLE-440:
------------------------------------
    Issue Type: Task  (was: Improvement)

> 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)