Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Checkstyle Test Coverage tool should ignore everything in the .gitignore of the repository it's invoked in #253

Open
alexjpwalker opened this issue Jan 22, 2021 · 0 comments

Comments

@alexjpwalker
Copy link
Member

Repositories such as client-nodejs, which generate large amounts of (ignored) files in the source folder when compiled, are difficult for tool/checkstyle/test-coverage to analyse because they contain so many files.

We already work around this problem by excluding specific named folders and files from the checkstyle coverage test, as follows:

workspace_files, _ = tc.shell_execute([
        'find', '.',
            '(', '-name', '.git',
            '-o', '-name', '.idea',
            '-o', '-name', '.ijwb',
            '-o', '-name', '.github',
            '-o', '-name', '.bazelversion',
            '-o', '-name', '.gitkeep',
            '-o', '-name', 'VERSION',
            '-o', '-name', '*.md',
            '-o', '-name', 'node_modules',
        ')', '-prune', '-o', '-type', 'f', '-print'
    ], cwd=os.getenv("BUILD_WORKSPACE_DIRECTORY"))

but this is woefully unmaintainable and would be much nicer if it parsed the .gitignore file.

@alexjpwalker alexjpwalker changed the title Checkstyle Test Coverage tool should ignore everything in .gitignore Checkstyle Test Coverage tool should ignore everything in the .gitignore of the repository it's invoked in Jan 22, 2021
lolski pushed a commit to lolski/dependencies that referenced this issue Oct 7, 2022
## What is the goal of this PR?
As we may need to extract `.zip` artifacts (for Windows), the `artifact_extractor` has been extended to choose a decompression tool according to the file's extension.

## What are the changes implemented in this PR?
- added unzip script
- the extract file extension and use  the right script to decompress it
lolski pushed a commit that referenced this issue Nov 18, 2022
## 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 #253 would
remove the need for this PR, but it's harder to do.
jamesreprise pushed a commit to jamesreprise/vaticle-dependencies that referenced this issue Dec 5, 2022
## 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 typedb#253 would
remove the need for this PR, but it's harder to do.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant