From 8106b662b2eeaa58ad2b3b58d32916d6595d124a Mon Sep 17 00:00:00 2001 From: Alex Walker Date: Fri, 18 Nov 2022 15:48:23 +0000 Subject: [PATCH] Exclude 'target' and '.DS_Store' from checkstyle coverage (#390) ## What is the goal of this PR? We now exclude `target` and `.DS_Store` from checkstyle coverage tests. ## What are the changes implemented in this PR? `target` is typically a generated folder (e.g. by `cargo`). `.DS_Store` is generated by Finder on a Mac. They should be excluded from checkstyle coverage. NB: Fixing https://github.com/vaticle/dependencies/issues/253 would remove the need for this PR, but it's harder to do. --- tool/checkstyle/test-coverage.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tool/checkstyle/test-coverage.py b/tool/checkstyle/test-coverage.py index 8be664701..78d7c2e45 100755 --- a/tool/checkstyle/test-coverage.py +++ b/tool/checkstyle/test-coverage.py @@ -36,6 +36,7 @@ def try_decode(s): workspace_files, _ = tc.shell_execute([ 'find', '.', '(', '-name', '.git', + '-o', '-name', '.DS_Store', '-o', '-name', '.idea', '-o', '-name', '.ijwb', '-o', '-name', '.github', @@ -44,6 +45,7 @@ def try_decode(s): '-o', '-name', 'VERSION', '-o', '-name', '*.md', '-o', '-name', 'node_modules', + '-o', '-name', 'target', ')', '-prune', '-o', '-type', 'f', '-print' ], cwd=os.getenv("BUILD_WORKSPACE_DIRECTORY")) workspace_files = workspace_files.split()