• 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)
102 fixesDir := filepath.Join(getCompilerArtifactsDir(env), "linting-output", "clang-tidy")
107 f, err := ioutil.TempFile(fixesDir, "lints-")
109 return fmt.Errorf("making tempfile for tidy: %v", err)
113 // `f` is an 'anchor'; it ensures we won't create a similarly-named file in the future.
118 extraTidyFlags = append(extraTidyFlags, "--export-fixes="+fixesFilePath, "--header-filter=.*")
121 return fmt.Errorf("calculating tidy invocation: %v", err)
158 // Sometimes, clang-tidy crashes. Unfortunately, these don't get funnelled through the
159 // standard clang crash machinery. :(. Try to work with our own.
161 tidyCrashArtifacts := path.Join(crashArtifactsDir, "clang-tidy")
166 f, err := ioutil.TempFile(tidyCrashArtifacts, "crash-")
174 reproCmd.Args = append(reproCmd.Args, "-E", "-o", f.Name())
179 return fmt.Errorf("attempting to produce a clang-tidy crash reproducer: %v", err)
204 "-checks="+strings.Join([]string{
206 "-bugprone-narrowing-conversions",
207 "-cppcoreguidelines-*",
208 "-fuchsia-*",
209 "-google-readability*",
210 "-google-runtime-references",
211 "-hicpp-*",
212 "-llvm-*",
213 "-misc-non-private-member-variables-in-classes",
214 "-misc-unused-parameters",
215 "-modernize-*",
216 "-readability-*",
220 return fmt.Errorf("calculating clang-tidy invocation: %v", err)
228 // Note: We continue on purpose when clang-tidy fails
230 fmt.Fprint(env.stderr(), "clang-tidy failed")