From 0f21ce007b5eb8ff407b168e5566998ce3f49b38 Mon Sep 17 00:00:00 2001 From: IEncinas10 Date: Thu, 6 Jul 2023 18:23:47 +0200 Subject: [PATCH] Apply clang-format and update copyright --- common/analysis/linter_test_utils.h | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/common/analysis/linter_test_utils.h b/common/analysis/linter_test_utils.h index 28c9db6268..c3c078a7fe 100644 --- a/common/analysis/linter_test_utils.h +++ b/common/analysis/linter_test_utils.h @@ -1,4 +1,4 @@ -// Copyright 2017-2020 The Verible Authors. +// Copyright 2017-2023 The Verible Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -50,9 +50,9 @@ struct LintTestCase : public TokenInfoTestData { // Returns true if every element is an exact match to the expected set. // TODO(b/141875806): Take a symbol translator function to produce a // human-readable, language-specific enum name. - bool ExactMatchFindings(const std::set& found_violations, + bool ExactMatchFindings(const std::set &found_violations, absl::string_view base, - std::ostream* diffstream) const; + std::ostream *diffstream) const; }; template @@ -66,8 +66,8 @@ class LintRunner; // Tests that LintTestCase test has expected violations under make_rule // Expects test.code to be accepted by AnalyzerType. template -void RunLintTestCase(const LintTestCase& test, - const LintRuleGenerator& make_rule, +void RunLintTestCase(const LintTestCase &test, + const LintRuleGenerator &make_rule, absl::string_view filename) { // All linters start by parsing to yield a TextStructure. // TODO(hzeller): make preprocessor configurable. Right now, preprocessor @@ -78,7 +78,7 @@ void RunLintTestCase(const LintTestCase& test, // Instantiate a linter that runs a single rule to analyze text. LintRunner lint_runner(make_rule()); const LintRuleStatus rule_status = lint_runner.Run(analyzer.Data(), filename); - const auto& violations(rule_status.violations); + const auto &violations(rule_status.violations); // Report detailed differences, if any. const absl::string_view base_text = analyzer.Data().Contents(); @@ -100,7 +100,7 @@ void RunConfiguredLintTestCases( CHECK(config_status.ok()) << config_status.message(); return instance; }; - for (const auto& test : tests) { + for (const auto &test : tests) { RunLintTestCase(test, rule_generator, filename); } } @@ -120,8 +120,8 @@ struct AutoFixInOut { // Tests that LintTestCase test has expected violations under make_rule // Expects test.code to be accepted by AnalyzerType. template -void RunLintAutoFixCase(const AutoFixInOut& test, - const LintRuleGenerator& make_rule) { +void RunLintAutoFixCase(const AutoFixInOut &test, + const LintRuleGenerator &make_rule) { // All linters start by parsing to yield a TextStructure. AnalyzerType analyzer(test.code, ""); absl::Status unused_parser_status = analyzer.Analyze(); @@ -158,7 +158,7 @@ void RunApplyFixCases(std::initializer_list tests, CHECK(config_status.ok()) << config_status.message(); return instance; }; - for (const auto& test : tests) { + for (const auto &test : tests) { RunLintAutoFixCase(test, rule_generator); } }