• Home
  • Raw
  • Download

Lines Matching +full:clang +full:- +full:tidy

2 // Use of this source code is governed by a BSD-style license that can be
29 const prefix = "-clang-tidy-flag="
54 if lastArg != "-o" {
71 // Files generated from protobufs can result in _many_ clang-tidy complaints, and aren't
90 clangTidyPath := filepath.Join(filepath.Dir(clangCmd.Path), "clang-tidy")
92 args = append(args, cSrcFile, "--", "-resource-dir="+resourceDir)
106 f, err := ioutil.TempFile(fixesDir, "lints-")
108 return fmt.Errorf("making tempfile for tidy: %v", err)
112 // `f` is an 'anchor'; it ensures we won't create a similarly-named file in the future.
117 extraTidyFlags = append(extraTidyFlags, "--export-fixes="+fixesFilePath, "--header-filter=.*")
120 return fmt.Errorf("calculating tidy invocation: %v", err)
157 // Sometimes, clang-tidy crashes. Unfortunately, these don't get funnelled through the
158 // standard clang crash machinery. :(. Try to work with our own.
160 tidyCrashArtifacts := path.Join(crashArtifactsDir, "clang-tidy")
165 f, err := ioutil.TempFile(tidyCrashArtifacts, "crash-")
173 reproCmd.Args = append(reproCmd.Args, "-E", "-o", f.Name())
178 return fmt.Errorf("attempting to produce a clang-tidy crash reproducer: %v", err)
203 "-checks="+strings.Join([]string{
205 "-bugprone-narrowing-conversions",
206 "-cppcoreguidelines-*",
207 "-fuchsia-*",
208 "-google-readability*",
209 "-google-runtime-references",
210 "-hicpp-*",
211 "-llvm-*",
212 "-misc-non-private-member-variables-in-classes",
213 "-misc-unused-parameters",
214 "-modernize-*",
215 "-readability-*",
219 return fmt.Errorf("calculating clang-tidy invocation: %v", err)
227 // Note: We continue on purpose when clang-tidy fails
229 fmt.Fprint(env.stderr(), "clang-tidy failed")