Paride Legovini has proposed merging ~paride/autopkgtest-cloud:pre-commit-misc into autopkgtest-cloud:master.
Commit message: More pre-commit checks. Requested reviews: Canonical's Ubuntu QA (canonical-ubuntu-qa) For more details, see: https://code.launchpad.net/~paride/autopkgtest-cloud/+git/autopkgtest-cloud/+merge/445541 -- Your team Canonical's Ubuntu QA is requested to review the proposed merge of ~paride/autopkgtest-cloud:pre-commit-misc into autopkgtest-cloud:master.
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index eb05b79..3ad872e 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,5 +1,16 @@ repos: + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.4.0 + hooks: + - id: end-of-file-fixer + - id: trailing-whitespace + - id: check-yaml - repo: https://github.com/shellcheck-py/shellcheck-py rev: v0.9.0.5 hooks: - id: shellcheck + - repo: https://github.com/adrienverge/yamllint.git + rev: v1.29.0 + hooks: + - id: yamllint + args: [--strict] diff --git a/.yamllint b/.yamllint new file mode 100644 index 0000000..f53eec5 --- /dev/null +++ b/.yamllint @@ -0,0 +1,3 @@ +extends: default +rules: + document-start: disable diff --git a/charms/focal/autopkgtest-cloud-worker/autopkgtest-cloud/worker-config-production/setup-canonical.sh b/charms/focal/autopkgtest-cloud-worker/autopkgtest-cloud/worker-config-production/setup-canonical.sh index 7cd94c8..04c1b34 100644 --- a/charms/focal/autopkgtest-cloud-worker/autopkgtest-cloud/worker-config-production/setup-canonical.sh +++ b/charms/focal/autopkgtest-cloud-worker/autopkgtest-cloud/worker-config-production/setup-canonical.sh @@ -9,13 +9,13 @@ RELEASE=$(lsb_release --codename --short 2>/dev/null) # Make the installed package versions match what is available from the configured # repositories, even if a downgrade is required. -# +# # We may end up with images with packages newer than those available from the # repositories when opening a new release (images are created using the # previous release dailies as a base, which may include 0-day SRUs, or # Launchpad may fail to copy packages, see openssl 3.0.8-1ubuntu2), or when # package versions are pulled from the archive. -# +# # Note: 'release a=' matches the Suite field in the repository Release file. cat >/etc/apt/preferences.d/force-downgrade-to-release.pref <<EOF Package: * diff --git a/charms/focal/autopkgtest-cloud-worker/tests/10-deploy b/charms/focal/autopkgtest-cloud-worker/tests/10-deploy index 2cd32f6..06cac38 100755 --- a/charms/focal/autopkgtest-cloud-worker/tests/10-deploy +++ b/charms/focal/autopkgtest-cloud-worker/tests/10-deploy @@ -30,6 +30,6 @@ class TestCharm(unittest.TestCase): # - .directory_contents(PATH) - List files and folders in PATH on that unit # - .relation(relation, service:rel) - Get relation data from return service - + if __name__ == '__main__': unittest.main() diff --git a/charms/focal/autopkgtest-cloud-worker/units/cloud-worker-maintenance.timer b/charms/focal/autopkgtest-cloud-worker/units/cloud-worker-maintenance.timer index a1a53ae..2bc5d9c 100644 --- a/charms/focal/autopkgtest-cloud-worker/units/cloud-worker-maintenance.timer +++ b/charms/focal/autopkgtest-cloud-worker/units/cloud-worker-maintenance.timer @@ -7,4 +7,3 @@ OnUnitInactiveSec=1h [Install] WantedBy=autopkgtest.target - diff --git a/charms/focal/autopkgtest-cloud-worker/units/filter-amqp-dupes-upstream.timer b/charms/focal/autopkgtest-cloud-worker/units/filter-amqp-dupes-upstream.timer index 381c936..6049a18 100644 --- a/charms/focal/autopkgtest-cloud-worker/units/filter-amqp-dupes-upstream.timer +++ b/charms/focal/autopkgtest-cloud-worker/units/filter-amqp-dupes-upstream.timer @@ -6,4 +6,3 @@ OnCalendar=minutely [Install] WantedBy=autopkgtest.target - diff --git a/charms/focal/autopkgtest-web/webcontrol/update-github-jobs b/charms/focal/autopkgtest-web/webcontrol/update-github-jobs index f2bb430..a0119ec 100755 --- a/charms/focal/autopkgtest-web/webcontrol/update-github-jobs +++ b/charms/focal/autopkgtest-web/webcontrol/update-github-jobs @@ -156,4 +156,3 @@ if __name__ == '__main__': for job in jobs: process_job(os.path.join(PENDING_DIR, job)) - diff --git a/ci/lint_test b/ci/lint_test index 15fc01d..1742fb2 100755 --- a/ci/lint_test +++ b/ci/lint_test @@ -94,14 +94,6 @@ if __name__=="__main__": "output": "", "code": 0 }, - 'yamllint': { - "files": ["../"], - "extensions": None, - "shebangs": None, - "args": "--no-warnings", - "output": "", - "code": 0 - } } for key, item in data.items(): @@ -129,4 +121,4 @@ if __name__=="__main__": if key == "yamllint" and item["code"] != 0: sys.exit(1) sys.exit(0) - sys.exit(0) \ No newline at end of file + sys.exit(0)
-- Mailing list: https://launchpad.net/~canonical-ubuntu-qa Post to : [email protected] Unsubscribe : https://launchpad.net/~canonical-ubuntu-qa More help : https://help.launchpad.net/ListHelp

