msys2 / MSYS2-packages

Package scripts for MSYS2.
https://packages.msys2.org
BSD 3-Clause "New" or "Revised" License
1.27k stars 482 forks source link

MSYS2 specific linter #3699

Open lazka opened 1 year ago

lazka commented 1 year ago

Just a braindump/copied from my notes:

There are already Arch specific linters like namcap, but we will never upstream any changes and we have to fight Linux things, so we might look into creating our own.

There are multiple things to lint/validate, maybe these should be split into separate commands:

All this could run in CI and stored as a markdown CI status report, to make reviews easier.

jeremyd2019 commented 1 year ago

Maybe we should have a rule that pkgbase must be the same as the directory that the PKGBUILD file is in? This is true in most cases already, and would simplify scripts that look for the PKGBUILD file.

jeremyd2019 commented 1 year ago

did a quick script over MINGW-packages srcinfo.json for packages where path != pkgbase:

mingw-w64-python-mapbox-earcut  !=  mingw-w64-mapbox-earcut
mingw-w64-livechart-gtk3  !=  mingw-w64-live-chart-gtk3
mingw-w64-wxSVG  !=  mingw-w64-wxsvg
mingw-w64-python-pyfastbti-git  !=  mingw-w64-python-pyfastbti
mingw-w64-wb32-dfu-updater_cli  !=  mingw-w64-wb32-dfu-updater
mingw-w64-rake-compiler  !=  mingw-w64-ruby-rake-compiler
mingw-w64-python-defusexml  !=  mingw-w64-python-defusedxml
mingw-w64-osgqtquick-git  !=  mingw-w64-osgQtQuick-git
mingw-w64-zig empty srcinfo
mingw-w64-openxr  !=  mingw-w64-openxr-sdk
mingw-w64-gammaray-qt5  !=  mingw-w64-gammaray
mingw-w64-hclient-git  !=  mingw-w64-hclient
mingw-w64-ghc empty srcinfo
mingw-w64-python-pyfasttextureutils-git  !=  mingw-w64-python-pyfasttextureutils
mingw-w64-gtest  !=  mingw-w64-googletest
mingw-w64-faudio  !=  mingw-w64-FAudio
mingw-w64-kdstatemachineeditor-qt5  !=  mingw-w64-kdstatemachineeditor
mingw-w64-streamlink  !=  mingw-w64-python-streamlink

and MSYS2-packages

perl-getopt-argvfile  !=  perl-Getopt-ArgvFile
perl-IO-stringy  !=  perl-IO-Stringy
nghttp2  !=  libnghttp2
perl-spiffy  !=  perl-Spiffy
ikspress commented 2 months ago

As far as I'm concerned, not only shellcheck is needed, but shfmt as well. A standardized coding style is important.