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

Replace Deepsource with open source components #1305

Closed
ernstleierzopf opened this issue Mar 18, 2024 · 10 comments · Fixed by #1309
Closed

Replace Deepsource with open source components #1305

ernstleierzopf opened this issue Mar 18, 2024 · 10 comments · Fixed by #1309
Assignees
Labels
refactor Issues with coding style test Test required or broken

Comments

@ernstleierzopf
Copy link
Contributor

ernstleierzopf commented Mar 18, 2024

Following modules should be included in the CI-Pipeline:

  • Bandit(Security-Checks)
  • mypy (already included)
  • prospector(wrapper for: pylint, pep8, pep257, pyflakes, mccabe, dodgy, pyroma, vulture) -> flake8 > pyflakes, mccabe includes flake8,
  • trivy (Security-Checks for the Repository)
  • flake8

Whitelisting comments must be replaced with the ones from the new components.

@ernstleierzopf ernstleierzopf added test Test required or broken refactor Issues with coding style labels Mar 18, 2024
@ernstleierzopf
Copy link
Contributor Author

not sure if using wrappers like prospector is a good idea for us. Keeping it modular for the moment.

@whotwagner
Copy link
Contributor

not sure if using wrappers like prospector is a good idea for us. Keeping it modular for the moment.

what are your doubts?

@ernstleierzopf
Copy link
Contributor Author

not sure if using wrappers like prospector is a good idea for us. Keeping it modular for the moment.

what are your doubts?

I got scared after running it locally within a pre-commit hook. Pylint seems to be too pedantic about issues where none exist.
If we use prospector (or other wrapper tools), it is not easily possible to just turn off Pylint. However, it is very easy to include the wanted tool separately.

@ernstleierzopf
Copy link
Contributor Author

not sure how to run trivy: https://github.com/aquasecurity/trivy
There is no apt package for it right? Also no pre-commit hook

@ernstleierzopf
Copy link
Contributor Author

also probably overkill to run with every test..

@whotwagner
Copy link
Contributor

whotwagner commented Mar 25, 2024

I just want to remind you that this task is assigned to me. As far as I know you can disable pylint with:

pylint:
  run: false

And each tool can be configured separately. see https://prospector.landscape.io/en/latest/profiles.html

@whotwagner
Copy link
Contributor

But you doubts let me thing about the advantages of using prospector other than having one single config-file? Maybe we can really spare it.

@ernstleierzopf
Copy link
Contributor Author

Deepsource seems to be running now, but I would still progress in replacing it with open-source tools.

@ernstleierzopf
Copy link
Contributor Author

ernstleierzopf commented Mar 25, 2024

I just want to remind you that this task is assigned to me. As far as I know you can disable pylint with:

pylint:
  run: false

And each tool can be configured separately. see https://prospector.landscape.io/en/latest/profiles.html

sorry, I thought I can do it as it requires removing all of the deepsource comments and creation of stages in the jenkinsfile.
I am already almost finished with it..

Please review the changes when I open the PR.

@ernstleierzopf
Copy link
Contributor Author

got mypy, bandit and flake8 tests in the Jenkins CI and also extended the pre-commit hook, notably with PEP257 checks with docformatter. There are also quite some changes to the format of docstrings..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactor Issues with coding style test Test required or broken
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants