GitLab Repositories with dots result in wrong paths for the SARIF converter
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 48/100
Direzione di ricerca
Start at CodeQualityToGitlab/SarifConverters/Converter1.cs around line 87 and inspect how MakeRelativeUri handles a project path such as /builds/my_group/ns.myproject. Compare this behavior with the roslynator converter's root-path handling. Done means SARIF paths under project roots containing dots are converted to the correct relative paths.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
If the project path contains any dots, e.g.: /builds/my_group/ns.myproject the roslynator converter correctly transforms the root paths.
However the Sarif Converters make use of the MakeRelativeUri function, which will treat the string wrong.
I suggest using something more robust like
var uri = new Uri(pathRoot);
var absolutePath = begin.ResultFile.Uri.LocalPath;
var rootPath = uri.LocalPath;
if (absolutePath.StartsWith(rootPath))
{
return absolutePath.Substring(rootPath.Length).Replace("//", "\\");
}
return begin.ResultFile.Uri.MakeRelativeUri(uri).ToString().Replace("//", "\\");
- Lingua principale
- C#
- Stelle
- 14
- Fork
- 8
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di codecentric/dotnet_gitlab_code_quality
-
root dir default realpath Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 52/100
Tutte le issue di codecentric/dotnet_gitlab_code_quality
Issue simili
-
type/automation type/tech-debt
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
-
t/bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
-
ci-failure-cause test-failure
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
-
area:auth FE mvp P3
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
klasolsson81/jobbliggaren#1788 ·