pkgcore / pkgcheck

pkgcore-based QA utility for ebuild repos
https://pkgcore.github.io/pkgcheck
BSD 3-Clause "New" or "Revised" License
34 stars 29 forks source link

GlobDistdir: check for glob usage with DISTDIR #610

Closed arthurzam closed 10 months ago

arthurzam commented 11 months ago

This time I decided to try to implement using tree-sitter query language. It is faster than in python scan, which is nice.

$ pkgcheck scan -c GlobCheck
games-strategy/homm2-gold-gog
  GlobDistdir: version 1.1.2.1.33438: line 40: unsafe filename expansion used with DISTDIR: "${DISTDIR}"/setup_heroes*.exe

media-gfx/darktable
  GlobDistdir: version 4.2.1: line 174: unsafe filename expansion used with DISTDIR: "${DISTDIR}"/${PN}-usermanual-${DOC_PV}.*.pdf
  GlobDistdir: version 4.4.1: line 171: unsafe filename expansion used with DISTDIR: "${DISTDIR}"/${PN}-usermanual-${DOC_PV}.*.pdf
  GlobDistdir: version 4.4.2: line 171: unsafe filename expansion used with DISTDIR: "${DISTDIR}"/${PN}-usermanual-${DOC_PV}.*.pdf

Resolves: https://github.com/pkgcore/pkgcheck/issues/605

arthurzam commented 10 months ago

@mgorny ping :)