[PATCH] D14629: [analyzer] Configuration file for scan-build.

Laszlo Nagy via cfe-commits cfe-commits at lists.llvm.org
Thu Nov 19 02:20:45 PST 2015


rizsotto.mailinglist added a comment.

I think the `scan-build` user experience would be improved by config file! And I really like how the `clang-tidy` guys were doing it. (In case if you are not familiar with it, copy from the help output)

  Configuration files:
    clang-tidy attempts to read configuration for each source file from a
    .clang-tidy file located in the closest parent directory of the source
    file. If any configuration options have a corresponding command-line
    option, command-line option takes precedence. The effective
    configuration can be inspected using -dump-config:
  
    $ clang-tidy -dump-config - --
      ---
      Checks:          '-*,some-check'
      HeaderFilterRegex: ''
      AnalyzeTemporaryDtors: false
      User:            user
      CheckOptions:
        - key:             some-check.SomeOption
          value:           'some value'
      ...

So the major difference from the current patch would be:

- It's not a windows .ini file, but YAML/JSON syntax.
- No need to provide default config file and check into the source repository.
- Loading of the config file is a bit more complex logic, than taking value from a specific location.

Benefit for the user to have common usage pattern of the clang related analyzer tools. What do you think?


http://reviews.llvm.org/D14629





More information about the cfe-commits mailing list