Closed mcondellva closed 1 year ago
@mcondellva are you saying it should be
switch strings.ToLower(language) {
instead of
switch language {
For the switch to work properly?
Yes. The languages from the GH API are capitalized (e.g. TypeScript) so the mapping is not working correctly.
This would mimic what's being done in the other tools (see verify-scans) when mapping languages.
Thank you @arilivigni! I merged the change. I will check tomorrow to make sure all looks good
Thanks for the change, however the metrics dashboard still appears to be mishandling at least typescript and kotlin. If you see, for example the repos bio-bis-source, bip-archetype-ui-mfe-app, cds-hooks-client-api, they appear to be compliant except for the missing analysis/missing database columns which only list either typescript or kotlin.
Hey @mcondellva
Thanks for letting me know, I see this, and now that I'm back to my computer I know why this is happening since I can actually look at code. I will get this mapped properly
FYI, fully enabled percent is and has been reported for the last number of weeks, weekly to CISO. Have hit seemingly hit ceiling at 6% in absence of adjusted numbers, for last number of weeks.
Pushed the changes: https://github.com/department-of-veterans-affairs/codeql-tools/commit/9a89ee2b2be872d7435afffaeb5b93a47a718947
Running the tests against it now, will have results within the hour
This is correct now, the language needed to mapped on both the expectedLanguages side and the foundLanguages side.
The enablement dashboard is listing languages that should be mapped (e.g, typescript, kotlin) as missing analyses and databases in the table, leading to incorrect metrics being reported.
It appears to be an issue in collect-metrics/internal/github_utils.go, the MapLanguages function on line 36. language needs to be made lower case for the switch to behave correctly.