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

Standardize formatting and fix Codacy errors #138

Open
wants to merge 29 commits into
base: develop
Choose a base branch
from
Open

Conversation

troyraen
Copy link
Collaborator

@troyraen troyraen commented Mar 2, 2022

Completes #99

Done, just waiting for testing.

  • Enable branch protection rules on master and develop. Merge requirements: PR, 1+ Approval (master requires approval by a code owner), Codacy Static Code Analysis passes.
  • Add file .pre-commit-config.yaml to enable the use of pre-commit Git hooks. Its use will be optional. To use it, first install pre-commit with pip install pre-commit, then each time you clone the repo, install the hooks defined in the config file with pre-commit install (in the repo's top-level directory).

Python files:

  • Run black
  • Reorder imports
  • Fix spacing, fstrings, docstrings
  • Use snake case, raise from, isinstance instead of type, is not instead of !=
  • Remove unused variables. Use list and dict constructors instead of comprehension. Avoid bare except.
  • Disable Pylint warnings of things that won't be fixed

Shell files:

  • Standardize formatting (quotes, brackets, etc.)
  • Run beautysh
  • Add missing variables and remove unused ones
  • Use -r with read to avoid mangling backslashes
  • Avoid cd when possible, else add || exit to exit on failure

Markdown files:

  • Fix issues that Codacy complains about in Markdown files
  • Run mdformat on all markdown files

Finally:

@troyraen troyraen marked this pull request as draft March 2, 2022 11:18
@troyraen troyraen marked this pull request as ready for review March 2, 2022 12:08
@troyraen troyraen added Maintenance Maintain function or increase stability Pipeline: Admin Administration tasks; may touch multiple pipeline areas, but not clearly owned by any of them labels Mar 27, 2022
@troyraen troyraen self-assigned this May 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Maintenance Maintain function or increase stability Pipeline: Admin Administration tasks; may touch multiple pipeline areas, but not clearly owned by any of them
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant