Skip to content

Commit

Permalink
[issues] remove checker names from human-readable issue types
Browse files Browse the repository at this point in the history
Summary:
Instead of, eg, "Pulse Transitive Access", display just "Transitive Access".
Manually inspected the output of `infer help --list-issue-types` to build the
list of checker names that appear in front of some of the issues. There's a
large conversation to be had about making these prefixes more uniform or
removing them altogether.

Reviewed By: ngorogiannis

Differential Revision: D52326171

fbshipit-source-id: 03183d35ac0802182e42c316198a08f2ecef0415
  • Loading branch information
jvillard authored and facebook-github-bot committed Dec 20, 2023
1 parent bf15957 commit 54c6397
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions infer/src/base/IssueType.ml
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,18 @@ end = struct
(** keep track of the list of all declared issue types *)
let all_issues = ref IssueSet.empty

let checker_names_to_remove = ["BIABDUCTION"; "CHECKERS"; "INFERBO"; "PULSE"]

let remove_leading_checker_name = function
| first :: rest when List.mem ~equal:String.equal checker_names_to_remove first ->
rest
| l ->
l


let prettify s =
String.lowercase s |> String.split ~on:'_' |> List.map ~f:String.capitalize
|> String.concat ~sep:" " |> String.strip
String.split ~on:'_' s |> remove_leading_checker_name |> List.map ~f:String.lowercase
|> List.map ~f:String.capitalize |> String.concat ~sep:" " |> String.strip


let set_enabled issue b = issue.enabled <- b
Expand Down

0 comments on commit 54c6397

Please sign in to comment.