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

Add support for bandit output file. #10412

Merged
merged 7 commits into from Jul 29, 2020
Merged

Conversation

asherf
Copy link
Member

@asherf asherf commented Jul 21, 2020

Similar to #10371

Problem

CI Systems (among other things) can usually pick up output of linters and display them in a more use friendly way (similar idea to junitxml for tests)
Currently, there is no way to have bandit write the violations it detects to a file (passthru args won't work due to pants engine isolation requirements)

Solution

Add explicit support for the bandit --output paramter and extract the output and write it to the requested directory.

Copy link
Contributor

@Eric-Arellano Eric-Arellano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for making this improvement!

@coveralls
Copy link

coveralls commented Jul 21, 2020

Coverage Status

Coverage remained the same at 0.0% when pulling 2ce31b2 on asherf:m2 into 57a1ff3 on pantsbuild:master.

Copy link
Contributor

@Eric-Arellano Eric-Arellano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, Asher!

@Eric-Arellano
Copy link
Contributor

Oops, I meant to merge this a few days ago. There have been some changes to the Plugin API the last week that conflict with this. I'm pushing a fix in a few moments and will merge when green.

# Conflicts:
#	src/python/pants/backend/python/lint/bandit/rules.py
#	src/python/pants/backend/python/lint/bandit/rules_integration_test.py

# Rust tests and lints will be skipped. Delete if not intended.
[ci skip-rust]

# Building wheels and fs_util will be skipped. Delete if not intended.
[ci skip-build-wheels]
# Rust tests and lints will be skipped. Delete if not intended.
[ci skip-rust]

# Building wheels and fs_util will be skipped. Delete if not intended.
[ci skip-build-wheels]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants