From 69d6df3a5b947e13d9b8b35410ebec443c290c38 Mon Sep 17 00:00:00 2001 From: Eric Gallager Date: Thu, 24 Oct 2024 23:37:07 -0400 Subject: [PATCH] configure yamllint Change-Id: Ibc26e663627c4ae69dfac78a42413e6e849ddb89 --- .github/workflows/apple-gdb-1824.yml | 7 ++++--- .github/workflows/bandit.yml | 6 ++++-- .github/workflows/codeql.yml | 17 ++++++++++++----- .yamllint.yml | 20 ++++++++++++++++++++ src/gdb/macosx/gdb.xcodeproj/project.pbxproj | 2 ++ 5 files changed, 42 insertions(+), 10 deletions(-) create mode 100644 .yamllint.yml diff --git a/.github/workflows/apple-gdb-1824.yml b/.github/workflows/apple-gdb-1824.yml index b69b77afb..e8f508e50 100644 --- a/.github/workflows/apple-gdb-1824.yml +++ b/.github/workflows/apple-gdb-1824.yml @@ -42,7 +42,7 @@ jobs: libgettextpo-dev tix tix-dev splint comprez cxref cxref-emacs \ exuberant-ctags universal-ctags texi2html eslint uglifyjs \ libjs-modernizr node-optionator node-babel-eslint npm doxygen \ - doxygen-latex graphviz dot2tex + doxygen-latex graphviz dot2tex yamllint - run: cd .profile.d && test -e ./.profile_generic && test -r ./.profile_generic && sync && source ./.profile_generic && sync && (env | uniq | sort | uniq | grep -v "\*\*\*" | grep -v "PWD\=") && sync && sleep 1 && sync - run: cd src && ./configure --with-x --disable-werror --disable-opts-test --enable-64-bit-bfd --enable-silent-rules --with-system-zlib CC=${{ matrix.compiler }} OBJC=${{ matrix.compiler }} - run: cd src && make configure-zlib && sync && make configure-bfd @@ -51,7 +51,7 @@ jobs: - run: cd src && if test -e autogen/Makefile; then (sync && make -C autogen && sync && sleep 1); elif test -d autogen; then (sync && echo "listing autogen Makefiles present" && sync && ls autogen/Makefile* && sync && sleep 1); else (sync && echo "skipping autogen" && sync && sleep 1); fi - run: cd src && make -C bfd diststuff - run: cd src && make all-zlib && sync && make all-bfd - - run: cd src && make all-opcodes + - run: cd src && make all-opcodes && sync - run: cd src && make configure-binutils - run: cd src && make info-binutils && sync && make dvi-binutils && sync && make TAGS-binutils - run: cd src && sync && make all-cgen && sync @@ -59,7 +59,7 @@ jobs: - run: cd src && make all-electric-fence - run: cd src && make all-etc && sync && make check-etc - run: cd src && make all-libdecnumber - - run: cd src && make all-mmalloc + - run: cd src && make all-mmalloc && sync && (stat mmalloc || ls "mm*") - run: cd src && make configure-readline - run: cd src && for dir in libtool_gnu sim utils tcl expect dejagnu itcl tk libgui; do if test -e ${dir}/configure; then (echo "configuring in ${dir}" && make configure-${dir} && echo "done configuring in ${dir}"); elif test -d ${dir}; then ls ${dir}/configure*; else echo "skipping configuring in ${dir}"; fi; done - run: cd src && for dir in sim utils tcl expect dejagnu itcl tk libgui; do if test -e ${dir}/Makefile; then (echo "building in ${dir}" && make -C ${dir}); elif test -d ${dir}; then ls ${dir}/Makefile*; else echo "skipping ${dir}"; fi; done @@ -68,6 +68,7 @@ jobs: - run: cd src/gdb/doc && make doxy && make all-doc && make diststuff && make links2roff - run: cd src && make info && sync && find . -name '*.info' -print - run: cd src && make check-zlib && sync && make check-libiberty + - run: cd src && yamllint zlib/contrib/perl/Compress-Raw-Zlib-*/META.yml - run: cd src/texinfo/js && (npm install || npm audit || npm ci || npm install-ci-test || npm install-test || stat package.json) - run: cd src && make check-texinfo_js && find . -name '*.js' -print - run: cd src && sync && find . -name '*.js' -print0 | xargs -0 node -c diff --git a/.github/workflows/bandit.yml b/.github/workflows/bandit.yml index e925e6fd0..53788852c 100644 --- a/.github/workflows/bandit.yml +++ b/.github/workflows/bandit.yml @@ -21,7 +21,8 @@ on: - master - main - dependabot/* - - autofix/alert-* + - autofix*alert* + - alert*autofix* - ruff_unsafe pull_request: # The branches below must be a subset of the branches above: @@ -29,7 +30,8 @@ on: - master - main - dependabot/* - - autofix/alert-* + - autofix*alert* + - alert*autofix* - ruff_unsafe schedule: - cron: '25 20 * * 6' diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 2e4eb677c..ad164130d 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -1,5 +1,5 @@ --- -# .github/workflows/codeql.yml: codeql workflow for apple-gdb-1824 +# .github/workflows/codeql.yml: GHA CodeQL workflow for apple-gdb-1824 # For most projects, this workflow file will not need changing; you simply need # to commit it to your repository. # @@ -20,7 +20,8 @@ on: - main - dependabot/* - codeql-* - - autofix/alert-* + - autofix*alert* + - alert*autofix* - ruff_unsafe pull_request: # The branches below must be a subset of the branches above @@ -29,7 +30,8 @@ on: - main - dependabot/* - codeql-* - - autofix/alert-* + - autofix*alert* + - alert*autofix* - ruff_unsafe schedule: - cron: '38 5 * * 2' @@ -153,7 +155,7 @@ jobs: python3-pylsp-flake8 python3-flake8-class-newline \ python3-flake8-quotes python3-flake8-import-order \ python3-flake8-comprehensions python3-flake8-deprecated; \ - pip install pylint flake8 ruff black pyupgrade; \ + pip install pylint flake8 ruff black pyupgrade bandit; \ elif test ${{ matrix.language }} == 'ruby'; then \ sudo apt-get -y install ruby ruby-dev libruby rake ruby-full \ ruby-ffi ruby-build jruby-openssl mruby libmruby-dev; \ @@ -280,7 +282,12 @@ jobs: stat "$(which pylint)"; \ sync && (flake8 || ruff check || (stat "$(which ruff)" && sleep 1)); \ if test -x "$(which yamllint)"; then \ - yamllint .github/FUNDING.yml .github/dependabot.yml; \ + yamllint .github/FUNDING.yml .github/dependabot.yml .yamllint.yml; \ + if test -x "$(which bandit)"; then \ + yamllint .github/workflows/bandit.yml || stat "$(which bandit)"; \ + else \ + sync && echo "skipping running yamllint on bandit workflow"; \ + fi else \ sync && echo "skipping yamllint..."; \ fi; \ diff --git a/.yamllint.yml b/.yamllint.yml new file mode 100644 index 000000000..e3911f5ee --- /dev/null +++ b/.yamllint.yml @@ -0,0 +1,20 @@ +--- +extends: default + +rules: + float-values: enable + indentation: + ignore: + - .github/workflows/apple-gdb-1824-macos.yml + - .github/workflows/codeql.yml + # some lines might be really long in this repo, and I don't feel like + # figuring out how to break them up: + line-length: + max: 99 + level: warning + ignore: + - .github/workflows/apple-gdb-1824*.yml + - .github/workflows/codeql.yml + - .travis.yml + octal-values: enable + truthy: disable diff --git a/src/gdb/macosx/gdb.xcodeproj/project.pbxproj b/src/gdb/macosx/gdb.xcodeproj/project.pbxproj index 4a71e77f1..486dd4a99 100644 --- a/src/gdb/macosx/gdb.xcodeproj/project.pbxproj +++ b/src/gdb/macosx/gdb.xcodeproj/project.pbxproj @@ -5321,6 +5321,7 @@ A589D79E1A313AA000E717B9 /* template.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = template.h; path = ../../../template.h; sourceTree = ""; }; A589D79F1A313AAF00E717B9 /* Special_Versions */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = Special_Versions; path = ../../../Special_Versions; sourceTree = ""; }; A589D7A01A313AB900E717B9 /* texi2html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.perl; name = texi2html; path = ../../../texi2html; sourceTree = ""; }; + A590CA052CCB45D3000FEB87 /* .yamllint.yml */ = {isa = PBXFileReference; lastKnownFileType = text.yaml; name = .yamllint.yml; path = ../../../.yamllint.yml; sourceTree = ""; }; A59249D41AAFEF1A00050903 /* AUTHORS */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = AUTHORS; sourceTree = ""; }; A59249D51AAFEF1A00050903 /* ChangeLog */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ChangeLog; sourceTree = ""; }; A59249DD1AAFEF1B00050903 /* coff.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = coff.h; path = "/Users/ericgallager/apple-gdb-1824/src/utils/amd-udi/include/coff.h"; sourceTree = ""; }; @@ -12818,6 +12819,7 @@ children = ( A50558F82AEB12BD00DFAB6C /* .github */, A53D6E2C2C49F40500A3E712 /* .profile.d */, + A590CA052CCB45D3000FEB87 /* .yamllint.yml */, A589C8E21A30EC7500E717B9 /* build.xml */, A589C8E31A30EC8600E717B9 /* cache-symfiles.sh */, A589C8E41A30ED2200E717B9 /* ChangeLog_just_me.txt */,