Skip to content

Commit

Permalink
[ci] Comment on what unchanged is
Browse files Browse the repository at this point in the history
This logic seems flimsy.  For now, just labeled it for what it is.  I think though we need to add extra item to properly track caching changes if formatting failed to do anything.
  • Loading branch information
hazendaz committed Jun 5, 2024
1 parent 7aa2347 commit 30ccd2b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/java/net/revelc/code/formatter/FormatterMojo.java
Original file line number Diff line number Diff line change
Expand Up @@ -775,6 +775,7 @@ protected void doFormatFile(final File file, final ResultCollector rc, final Pro

// Process the result type
if (Result.SKIPPED.equals(result)) {
// Use unchanged count for files that either 'skipFormattingCache' or cache missed but flagged to skip formatting.
rc.unchangedCount++;
} else if (Result.SUCCESS.equals(result)) {
rc.successCount++;
Expand Down Expand Up @@ -1111,7 +1112,7 @@ static class ResultCollector {
/** The skipped count is incremented for cached files that haven't changed since being cached. */
int skippedCount;

/** The unchanged count is incremented on cache misses when a file remains unchanged after formatting. */
/** Use unchanged count for files that either 'skipFormattingCache' or cache missed but flagged to skip formatting. */
int unchangedCount;

/** The read only count. */
Expand Down

0 comments on commit 30ccd2b

Please sign in to comment.