Support custom repositories for the [[analyzer]] of Scan.toml

Aperta
#211 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à
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
52/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
java
Ambito
cli

Direzione di ricerca

Start in ScanUtils.loadAnalyzer, where any repository value other than "local" is currently dropped, and look at how the generated dependency gets its repository field for the local case. Check how Settings.toml repository ids are read elsewhere in the tool so the same lookup can be reused. Done when an [[analyzer]] with a declared repository id resolves through that repository, and an unknown id fails with an error that includes its position. Ask in the issue how the repository id should be validated before you start.

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

Descrizione

Area/Configuration Type/New Feature
Area

Configuration

Problem

An [[analyzer]] in Scan.toml can only be resolved from Ballerina Central or, with repository = "local", from the local repository. Any other repository value is dropped without a message (ScanUtils.loadAnalyzer), so the analyzer is looked up in Central instead.

Ballerina supports custom repositories: a Maven repository declared in Settings.toml with an id can be used by a dependency through repository = "<id>" in Ballerina.toml. An organization that publishes its static code analyzer to such a repository can't use it with bal scan.

The release-readiness fixes for #190 make a repository other than "local" an error saying it is not supported, instead of dropping it.

Proposed Solution

Accept the id of a repository declared in Settings.toml as the repository of an [[analyzer]], and pass it to the generated dependency, as is done for "local". Report an unknown repository id as an error with its position.

Alternatives

Keep only Central and "local", and publish analyzers to Central.

Version

0.14.0

Lingua principale
Java
Stelle
15
Fork
12
Merge medio
2g 8h
PR unite (30g)
29

Preparare l'ambiente

  • Nessun Dockerfile né file Docker Compose
  • Ha un modello di pull request
  • Nessuna guida per i contributori

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 ballerina-platform/static-code-analysis-tool

Tutte le issue di ballerina-platform/static-code-analysis-tool

Issue simili

Altre issue su Java

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.