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 ability to have custom lint checks #573

Merged
merged 1 commit into from
Mar 2, 2022

Conversation

bmclaughlin
Copy link
Contributor

@bmclaughlin bmclaughlin commented Feb 17, 2022

closes #572

@@ -0,0 +1 @@
#!/bin/bash
Copy link
Member

Choose a reason for hiding this comment

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

That's not the way it will work. This file will be wiped all the time by the plugin template.

@@ -71,6 +71,11 @@ jobs:
run: flake8 --config flake8.cfg
{%- endif %}

{% if extra_linting -%}
- name: Run extra lint checks
run: sh .ci/scripts/extra_linting.sh
Copy link
Member

Choose a reason for hiding this comment

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

How about something like [ -x .ci/scripts/extra_linting.sh] && .ci/scripts/extra_linting.sh?

CHANGES/572.misc Outdated
@@ -0,0 +1 @@
Add ability to perform custom lint checks
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
Add ability to perform custom lint checks
Added the ability to perform custom lint checks.

@@ -71,6 +71,11 @@ jobs:
run: flake8 --config flake8.cfg
{%- endif %}

{% if extra_linting -%}
- name: Run extra lint checks
run: [ -x .ci/scripts/extra_linting.sh] && .ci/scripts/extra_linting.sh
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
run: [ -x .ci/scripts/extra_linting.sh] && .ci/scripts/extra_linting.sh
run: [ -x .ci/scripts/extra_linting.sh ] && .ci/scripts/extra_linting.sh

plugin-template Outdated
@@ -22,6 +22,7 @@ DEFAULT_SETTINGS = {
"upgrade_range": [],
"black": True,
"flake8": True,
"extra_linting": False,
Copy link
Member

Choose a reason for hiding this comment

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

I don't think we need the double guard here.

Comment on lines 74 to 77
{% if extra_linting -%}
- name: Run extra lint checks
run: [ -x .ci/scripts/extra_linting.sh ] && .ci/scripts/extra_linting.sh
{%- endif %}
Copy link
Member

Choose a reason for hiding this comment

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

Sorry, forgot to mention: You need to remove the ifs and the docs for this flag again.
The whole PR would just be lines 75-76 (and the changelog).

@mdellweg mdellweg merged commit daff218 into pulp:main Mar 2, 2022
@bmclaughlin bmclaughlin deleted the add-extra-linting branch March 2, 2022 14:30
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.

Allow custom lint checks
2 participants