Skip to content

Python linter and license banner check#185

Open
SorinOlari wants to merge 7 commits intomainfrom
python_linter_and_license_banner_check
Open

Python linter and license banner check#185
SorinOlari wants to merge 7 commits intomainfrom
python_linter_and_license_banner_check

Conversation

@SorinOlari
Copy link
Collaborator

Description

  • Added autopep8 as Python formatter and linter. Added linter check to the CI pipeline
  • Added Python files to the license banner checker
  • Updated yamllint rules

Also, please list any issue that this PR is intended to fix.

Type of change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)
  • Code cleanup/refactoring
  • CI system update

How Has This Been Tested?

Intentionally introduced errors in the license banner text to ensure the script detects them as expected.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

@SorinOlari SorinOlari requested a review from casaroli March 4, 2026 10:43
@SorinOlari SorinOlari self-assigned this Mar 4, 2026
@SorinOlari SorinOlari requested review from kr-t and srberard as code owners March 4, 2026 10:43
@SorinOlari SorinOlari force-pushed the python_linter_and_license_banner_check branch 3 times, most recently from bb12a63 to 1f6d44e Compare March 4, 2026 12:16
@SorinOlari SorinOlari marked this pull request as draft March 4, 2026 12:18
@SorinOlari SorinOlari force-pushed the python_linter_and_license_banner_check branch 4 times, most recently from 41a4cc9 to 07f239e Compare March 5, 2026 09:15
Signed-off-by: SorinO <sorin.olari2@gmail.com>
Signed-off-by: SorinO <sorin.olari2@gmail.com>
Signed-off-by: SorinO <sorin.olari2@gmail.com>
Signed-off-by: SorinO <sorin.olari2@gmail.com>
Signed-off-by: SorinO <sorin.olari2@gmail.com>
Signed-off-by: SorinO <sorin.olari2@gmail.com>
@SorinOlari SorinOlari force-pushed the python_linter_and_license_banner_check branch from 07f239e to 5f9d109 Compare March 6, 2026 08:53
@SorinOlari SorinOlari changed the title [DRAFT] Python linter and license banner check Python linter and license banner check Mar 6, 2026
@SorinOlari SorinOlari marked this pull request as ready for review March 6, 2026 10:44
local first_line
first_line=$(head -n 1 "$file")
if [ "${first_line#\#\!/bin}" != "$first_line" ]; then
if [ "${first_line#\#\!/bin}" != "$first_line" ] || [ "${first_line#\#\!/usr/bin}" != "$first_line" ]; then
Copy link
Contributor

@casaroli casaroli Mar 9, 2026

Choose a reason for hiding this comment

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

Suggested change
if [ "${first_line#\#\!/bin}" != "$first_line" ] || [ "${first_line#\#\!/usr/bin}" != "$first_line" ]; then
if [ "${first_line#\#\!/}"x != "${first_line}x" ]; then

Copy link
Contributor

@casaroli casaroli left a comment

Choose a reason for hiding this comment

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

all good, we can simplify the testing for the shebang.

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.

2 participants