--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)

Ouverte
#241 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 1 jour

Personne n'a encore pris cette issue.

Évaluation

Difficulté
4/5
Temps estimé
3-5 jours
Accessibilité débutants
35/100
Type d'issue
Bug
Clarté
Plutôt claire
Activité
Active
Stack technique
erlang, java, python, r, shell, swift, terraform, xml
Domaine
tooling

Piste de recherche

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.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

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

Langage dominant
Python
Étoiles
4
Forks
1
Merge moyen
10 h 41 min
PR mergées (30 j)
79

Préparer son environnement

Ce projet ne fournit ni conteneur de développement, ni Dockerfile, ni guide de contribution : l'installation est à votre charge. Commencez par son README, et consultez notre guide de la première contribution pour les étapes générales.

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de cpp-best-practices/project_validator

Toutes les issues de cpp-best-practices/project_validator

Issues similaires

Plus d'issues Python

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.