--map reports a language and its suffix as unrecognised at once (CUDA/.cu, Objective-C/.m) and lists files the profiles read (.freeze, .xctestplan, .resolved, .Plugin, .rda, .eex, .asciidoc, .tftpl, .zsh-theme)

Aperta
#241 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
erlang, java, python, r, shell, swift, terraform, xml
Ambito
tooling

Direzione di ricerca

The suffix tables are in project_validator/ecosystems/beam.py (around line 516), terraform.py (around lines 171-172) and swift.py (the XCODE_TEST_SETTINGS and PACKAGE_RESOLVED readers); the upper-case .XSD mismatch is in facts/structure.py (around line 214) and xml_schemas.py. Start by choosing one unrecognised suffix, such as .tftpl, and claiming it in its profile, then run --map on a small fixture to see it leave unrecognised_suffixes. Several items are policy questions (whether a language and its suffix can both be reported, and whether rchk counts as static analysis), so confirm the direction with a maintainer before editing.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

glfw lists languages: ["C", "Objective-C"] and .m ×5 unrecognised; llama.cpp CUDA and .cu ×209. cabal.project.freeze (a documented Haskell lock file), *.xctestplan and Package.resolved (read by the Swift profile), META-INF/services/*.Plugin (Java ServiceLoader files), .rda/.rds/.RData/.Rraw/.Rout.save/Makevars.win (R), .eex/.heex/.app.src/.config/.spec/.asciidoc/.cheatmd (BEAM), .tftpl/.tpl (Terraform templates), .zsh-theme/.zunit, .feature (Cucumber) are reported as unknown suffixes. Either the profile claims them or the language is not claimed.

Evidence from the corpus audit

ninenines/cowboy, elixir-ecto/ecto, phoenixframework/phoenix / detection (BEAM-ecosystem suffixes)
  • kind: DETECTION
  • actual: unrecognised suffixes: cowboy .asciidoc x151, .config x15, .ezdoc x3, .app x1, .spec x1 (CT spec),
    .dtl x1; phoenix .eex x156, .cheatmd x1; ecto .cheatmd x2
  • expected: .eex/.heex/.leex (EEx templates) and .app.src/.config/.spec (Erlang terms) belong to the BEAM
    profile; .cheatmd is an ex_doc cheatsheet (documentation); .asciidoc is documentation (see the README finding).
  • evidence: the unrecognised_suffixes arrays in the three .map.json files; project_validator/ecosystems/beam.py:516:
    source_suffixes={".ex": ELIXIR, ".exs": ELIXIR, ".erl": ERLANG, ".hrl": ERLANG}
  • repro: a Mix project with lib/x.html.heex and guides/cheatsheets/x.cheatmd
  • confidence: medium (low impact; data-wellformed/committed-artifacts could use .config/.app)
glfw/glfw, ggml-org/llama.cpp / detection (languages vs suffixes)
  • kind: MESSAGE
  • actual: glfw .map.json lists languages: ["C", "Objective-C"] and unrecognised_suffixes: [{".m": 5}]; llama.cpp lists CUDA as a language and .cu (209), .cuh (96) as unrecognised.
  • expected: a language the map names should not also be reported as unrecognised files (or the language should not be claimed).
  • evidence: glfw__glfw.map.json: "languages": ["C", "Objective-C"], {"suffix": ".m", "files": 5}; ggml-org__llama.cpp.map.json: "CUDA" in languages, {"suffix": ".cu", "files": 209}.
  • repro: a CMake project with project(x C OBJC) and one .m file.
  • confidence: low
PostgREST/postgrest, koalaman/shellcheck / map (unrecognised suffix .freeze)
  • kind: MESSAGE
  • actual: .map.json unrecognised_suffixes: {"suffix": ".freeze", "files": 1} in both projects, while PostgREST's dependency-management says locked in cabal.project.freeze, stack.yaml.lock
  • expected: cabal.project.freeze is a known Haskell lock file (docs/ecosystems/haskell.md: "commits cabal.project.freeze") and should not be listed as unrecognised; shellcheck's is builders/linux.armv6hf/cabal.project.freeze.
  • evidence: PostgREST__postgrest/cabal.project.freeze (root); koalaman__shellcheck/builders/linux.armv6hf/cabal.project.freeze
  • repro: a Cabal package with cabal.project.freeze; run --map
  • confidence: medium
Rdatatable/data.table, tidyverse/dplyr, r-lib/testthat / detection (R data files and R-specific analyzers)
  • kind: UNSUPPORTED
  • actual: unrecognised_suffixes: data.table .Rraw (12), .Rdata (4), .RData (2), .save (2), .win (1 = Makevars.win); dplyr .rda (5); testthat .rds, .win. data.table's rchk.yaml (rchk, the R-API static analyser for C code), the Coccinelle lint job and .ci/lint.R custom linters are not recognised as static analysis.
  • expected: .rda/.rds/.RData/.Rdata (serialised R data under data/, inst/), .Rraw (data.table's test scripts), .Rout.save/Makevars.win are files of the R ecosystem and should not be reported as unrecognised; rchk is the standard analyser for R packages with C code and would be a natural static-analysis tool for R's native code.
  • evidence: data/starwars.rda (dplyr); inst/tests/tests.Rraw, src/Makevars.win (data.table); .github/workflows/rchk.yaml:46-56: - name: Run rchk ... - name: Confirm that rchk has no errors; .github/workflows/code-quality.yaml:74-78: Install Coccinelle / run: /usr/bin/sudo apt-get -y install coccinelle / - name: Lint.
  • repro: an R package with data/x.rda; expect no unrecognised suffix.
  • confidence: medium
ohmyzsh/ohmyzsh / detection, tests-run
  • kind: UNSUPPORTED
  • actual: .map.json unrecognised_suffixes: .zsh-theme x144, .zunit x3; Shell: no tests found
  • expected: .zsh-theme files are zsh scripts (Shell); plugins/dotenv/tests/*.zunit are zunit tests (CI does not run them, so the FAIL stands, but the message "no tests found" is wrong).
  • evidence: themes/*.zsh-theme (144 files); plugins/dotenv/tests/basic-parsing.zunit, security.zunit, compatibility.zunit; .github/workflows/main.yml:36: zsh -n "$file" || return 1 (syntax check only).
  • repro: a tests/a.zunit file.
  • confidence: low
flyway/flyway / detection (META-INF/services)
  • kind: DETECTION
  • actual: map unrecognised_suffixes: .Plugin 40 files
  • expected: Java ServiceLoader provider files under META-INF/services/ are JVM resources, not unknown suffixes
  • evidence: flyway-commandline/src/main/resources/META-INF/services/org.flywaydb.core.extensibility.Plugin;
    validator: grep -rn META-INF project_validator/ecosystems/jvm/ returns nothing
  • repro: src/main/resources/META-INF/services/com.example.Spi
  • confidence: medium
Alamofire/Alamofire, pointfreeco/swift-composable-architecture, realm/SwiftLint / detection (unrecognised suffixes the profile reads)
  • kind: MESSAGE
  • actual: --map unrecognised_suffixes lists .xctestplan (Alamofire 5 files, TCA 1) and .resolved (TCA 2,
    SwiftLint 1), yet the Swift profile reads *.xctestplan for coverage settings and Package.resolved as the
    lockfile (dependency-management PASS cites Package.resolved).
  • expected: files a settings/lockfile reader consumes are recognised, not reported as unknown suffixes.
  • evidence: project_validator/ecosystems/swift.py:179: XCODE_TEST_SETTINGS = SettingsReader(name="Xcode", files=("*.xcscheme", "*.xctestplan"), ...);
    swift.py:390: PACKAGE_RESOLVED = lockfile_reader(manager="SwiftPM", files=("Package.resolved",));
    Alamofire Tests/Test Plans/iOS.xctestplan; SwiftLint ./Package.resolved.
  • repro: a Swift package with Package.resolved committed; run --map.
  • confidence: low
terraform-google-modules/terraform-google-kubernetes-engine, terraform-aws-modules/terraform-aws-eks / detection (suffixes)
  • kind: UNSUPPORTED
  • actual: map unrecognised_suffixes: [{".tmpl": 16}, {".tftpl": 1}] (GKE), [{".tpl": 8}] (eks)
  • expected: .tftpl is Terraform's documented template-file suffix (for templatefile()), and .tpl is its older convention; a Terraform profile should claim them (as templates, role template).
  • evidence: examples/safer_cluster_iap_bastion/templates/startup-script.tftpl; eks templates/al2023_user_data.tpl. Validator: ecosystems/terraform.py:171-172: source_suffixes={".tf": ..., ".tofu": ..., ".tfvars": ...}, ambiguous_suffixes={".hcl": TERRAFORM}.
  • repro: templates/x.tftpl in a Terraform project; expect it recognised, not listed as unrecognised.
  • confidence: medium
ISO-TC211/XML / detection (.XSD suffix case)
  • kind: DETECTION
  • actual: unrecognised_suffixes lists .XSD (4 files); data-wellformed does not parse them; yet schema-declared
    judges them ("schemas.isotc211.org/19160/-4/aip/2.8.0/cov.XSD: no targetNamespace")
  • expected: one consistent treatment: either an upper-case suffix is the format (then it is parsed by data-wellformed
    and not "unrecognised") or it is not (then schema-declared does not judge it).
  • evidence: schemas.isotc211.org/19160/-4/aip/2.8.0/cov.XSD, schemas.isotc211.org/19156/-/onm/2.0.0.1/modelConsistency,xsd.XSD
    (+ their schemas.isotc211.orgWork copies). Validator: ecosystems/xml_schemas.py:xsd_files uses
    PurePosixPath(path).suffix.lower() == ".xsd"; facts/structure.py:214 known.get(PurePosixPath(path).suffix)
    does not lower.
  • repro: a single A.XSD.
  • confidence: medium

Found by the regression-corpus audit (235 real repositories, one or more per ecosystem profile; corpus and expected results in corpus/). Evidence is quoted from the audited checkouts at the commits pinned in corpus/projects.toml; <checkouts>/<owner>__<repo> is such a checkout.

🤖 Generated with Claude Code

https://claude.ai/code/session_01ByTXNqDWdM7HzezrFtEvQt

Lingua principale
Python
Stelle
4
Fork
1
Merge medio
10h 41m
PR unite (30g)
79

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di cpp-best-practices/project_validator

Tutte le issue di cpp-best-practices/project_validator

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.