-
Notifications
You must be signed in to change notification settings - Fork 22
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
Fix paths and regenerate files after recent changes #127
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#!/bin/sh | ||
#!/bin/bash | ||
# | ||
# Copyright (c) 2021, United States Government, as represented by the | ||
# Administrator of the National Aeronautics and Space Administration. | ||
|
@@ -72,12 +72,18 @@ echo " Analysing python code style with 'isort'." | |
# could happen for example if the .isort.cfg src_paths list gets out | ||
# of date. | ||
|
||
if $(isort ${py_changed} --profile black --diff --check-only --quiet >/dev/null); then | ||
isort_args=( | ||
"--extend-skip=cmake" | ||
"--extend-skip=submodules" | ||
"--extend-skip=astrobee/survey_manager/survey_dependencies" | ||
"--profile=black" | ||
) | ||
if $(isort . "${isort_args[@]}" --diff --check-only --quiet >/dev/null); then | ||
echo "Linter checks using 'isort' passed." | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's important to use Note this is following how it's done in the |
||
else | ||
echo "Errors detected with 'isort'. Fixing them. Try to add and commit your files again." | ||
isort ${py_changed} --profile black >/dev/null | ||
failed_lint=true | ||
isort . "${isort_args[@]}" >/dev/null | ||
failed_lint=true | ||
fi | ||
|
||
# Cancel commit if linter failed | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(Skipping folders of external code we shouldn't lint.)