Fixup lint errors.

This CL fixes up the various lint errors.

Change-Id: If4d3077b55aadec33980452c43917194d803fac6
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/31680
Reviewed-by: Ben Clayton <bclayton@google.com>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dan sinclair <dsinclair@chromium.org>
diff --git a/PRESUBMIT.py b/PRESUBMIT.py
index 5d57660..cfff527 100755
--- a/PRESUBMIT.py
+++ b/PRESUBMIT.py
@@ -60,8 +60,9 @@
     results += input_api.canned_checks.CheckChangeHasNoStrayWhitespace(
         input_api, output_api)
     results += input_api.canned_checks.CheckDoNotSubmit(input_api, output_api)
-    results += input_api.canned_checks.CheckChangeLintsClean(
-        input_api, output_api)
+    results += input_api.canned_checks.CheckChangeLintsClean(input_api,
+                                                             output_api,
+                                                             lint_filters="")
     results += input_api.canned_checks.CheckGenderNeutral(
         input_api, output_api)
 
diff --git a/samples/main.cc b/samples/main.cc
index b42a0ed..5494ef1 100644
--- a/samples/main.cc
+++ b/samples/main.cc
@@ -24,9 +24,8 @@
 #include "spirv-tools/libspirv.hpp"
 #endif  // TINT_BUILD_SPV_READER
 
-#include "tint/tint.h"
-
 #include "src/diagnostic/printer.h"
+#include "tint/tint.h"
 
 namespace {
 
diff --git a/src/ast/block_statement.h b/src/ast/block_statement.h
index 5962867..3c2a268 100644
--- a/src/ast/block_statement.h
+++ b/src/ast/block_statement.h
@@ -46,8 +46,7 @@
   /// @param index the index to insert at
   /// @param stmt the statement to insert
   void insert(size_t index, std::unique_ptr<ast::Statement> stmt) {
-    statements_.insert(statements_.begin() + static_cast<long>(index),
-                       std::move(stmt));
+    statements_.insert(statements_.begin() + index, std::move(stmt));
   }
 
   /// @returns true if the block is empty
diff --git a/src/ast/function.h b/src/ast/function.h
index 25bb059..52cff49 100644
--- a/src/ast/function.h
+++ b/src/ast/function.h
@@ -18,6 +18,7 @@
 #include <memory>
 #include <ostream>
 #include <string>
+#include <tuple>
 #include <utility>
 #include <vector>
 
diff --git a/src/ast/if_statement_test.cc b/src/ast/if_statement_test.cc
index 2e3db87..67597ea 100644
--- a/src/ast/if_statement_test.cc
+++ b/src/ast/if_statement_test.cc
@@ -43,7 +43,8 @@
   auto body = std::make_unique<ast::BlockStatement>();
   body->append(std::make_unique<DiscardStatement>());
 
-  IfStatement stmt(Source{Source::Location{20, 2}}, std::move(cond), std::move(body));
+  IfStatement stmt(Source{Source::Location{20, 2}}, std::move(cond),
+                   std::move(body));
   auto src = stmt.source();
   EXPECT_EQ(src.range.begin.line, 20u);
   EXPECT_EQ(src.range.begin.column, 2u);
diff --git a/src/ast/loop_statement.h b/src/ast/loop_statement.h
index edb2381..919eb06 100644
--- a/src/ast/loop_statement.h
+++ b/src/ast/loop_statement.h
@@ -15,6 +15,7 @@
 #ifndef SRC_AST_LOOP_STATEMENT_H_
 #define SRC_AST_LOOP_STATEMENT_H_
 
+#include <memory>
 #include <utility>
 
 #include "src/ast/block_statement.h"
diff --git a/src/ast/switch_statement_test.cc b/src/ast/switch_statement_test.cc
index b37c07a..52774c6 100644
--- a/src/ast/switch_statement_test.cc
+++ b/src/ast/switch_statement_test.cc
@@ -51,7 +51,8 @@
 TEST_F(SwitchStatementTest, Creation_WithSource) {
   auto ident = std::make_unique<IdentifierExpression>("ident");
 
-  SwitchStatement stmt(Source{Source::Location{20, 2}}, std::move(ident), CaseStatementList());
+  SwitchStatement stmt(Source{Source::Location{20, 2}}, std::move(ident),
+                       CaseStatementList());
   auto src = stmt.source();
   EXPECT_EQ(src.range.begin.line, 20u);
   EXPECT_EQ(src.range.begin.column, 2u);
diff --git a/src/ast/type/access_control_type.h b/src/ast/type/access_control_type.h
index cf802b6..146a80a 100644
--- a/src/ast/type/access_control_type.h
+++ b/src/ast/type/access_control_type.h
@@ -15,9 +15,10 @@
 #ifndef SRC_AST_TYPE_ACCESS_CONTROL_TYPE_H_
 #define SRC_AST_TYPE_ACCESS_CONTROL_TYPE_H_
 
-#include "src/ast/type/type.h"
+#include <string>
 
 #include "src/ast/access_control.h"
+#include "src/ast/type/type.h"
 
 namespace tint {
 namespace ast {
diff --git a/src/ast/type/array_type.h b/src/ast/type/array_type.h
index fceca8e..aaea058 100644
--- a/src/ast/type/array_type.h
+++ b/src/ast/type/array_type.h
@@ -18,6 +18,7 @@
 #include <assert.h>
 
 #include <string>
+#include <utility>
 
 #include "src/ast/array_decoration.h"
 #include "src/ast/type/type.h"
diff --git a/src/ast/type/array_type_test.cc b/src/ast/type/array_type_test.cc
index 71b4343..2f128a4 100644
--- a/src/ast/type/array_type_test.cc
+++ b/src/ast/type/array_type_test.cc
@@ -14,6 +14,9 @@
 
 #include "src/ast/type/array_type.h"
 
+#include <memory>
+#include <utility>
+
 #include "gtest/gtest.h"
 #include "src/ast/stride_decoration.h"
 #include "src/ast/type/i32_type.h"
diff --git a/src/ast/type/storage_texture_type_test.cc b/src/ast/type/storage_texture_type_test.cc
index da4f501..cc0679f 100644
--- a/src/ast/type/storage_texture_type_test.cc
+++ b/src/ast/type/storage_texture_type_test.cc
@@ -14,10 +14,11 @@
 
 #include "src/ast/type/storage_texture_type.h"
 
-#include "src/ast/identifier_expression.h"
-#include "src/type_determiner.h"
+#include <memory>
 
 #include "gtest/gtest.h"
+#include "src/ast/identifier_expression.h"
+#include "src/type_determiner.h"
 
 namespace tint {
 namespace ast {
diff --git a/src/diagnostic/formatter_test.cc b/src/diagnostic/formatter_test.cc
index 69654a2..582557b 100644
--- a/src/diagnostic/formatter_test.cc
+++ b/src/diagnostic/formatter_test.cc
@@ -13,9 +13,9 @@
 // limitations under the License.
 
 #include "src/diagnostic/formatter.h"
-#include "src/diagnostic/diagnostic.h"
 
 #include "gtest/gtest.h"
+#include "src/diagnostic/diagnostic.h"
 
 namespace tint {
 namespace diag {
diff --git a/src/diagnostic/printer_linux.cc b/src/diagnostic/printer_linux.cc
index 840b133..99b0da4 100644
--- a/src/diagnostic/printer_linux.cc
+++ b/src/diagnostic/printer_linux.cc
@@ -12,12 +12,12 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-#include "src/diagnostic/printer.h"
-
 #include <unistd.h>
 
 #include <cstring>
 
+#include "src/diagnostic/printer.h"
+
 namespace tint {
 namespace diag {
 namespace {
diff --git a/src/diagnostic/printer_other.cc b/src/diagnostic/printer_other.cc
index 8d15c38..bde534a 100644
--- a/src/diagnostic/printer_other.cc
+++ b/src/diagnostic/printer_other.cc
@@ -12,10 +12,10 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-#include "src/diagnostic/printer.h"
-
 #include <cstring>
 
+#include "src/diagnostic/printer.h"
+
 namespace tint {
 namespace diag {
 namespace {
diff --git a/src/diagnostic/printer_windows.cc b/src/diagnostic/printer_windows.cc
index efcd60d..504ca9b 100644
--- a/src/diagnostic/printer_windows.cc
+++ b/src/diagnostic/printer_windows.cc
@@ -12,10 +12,10 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-#include "src/diagnostic/printer.h"
-
 #include <cstring>
 
+#include "src/diagnostic/printer.h"
+
 #define WIN32_LEAN_AND_MEAN 1
 #include <Windows.h>
 
diff --git a/src/inspector/entry_point.h b/src/inspector/entry_point.h
index 8c3bd73..137f41a 100644
--- a/src/inspector/entry_point.h
+++ b/src/inspector/entry_point.h
@@ -15,6 +15,7 @@
 #ifndef SRC_INSPECTOR_ENTRY_POINT_H_
 #define SRC_INSPECTOR_ENTRY_POINT_H_
 
+#include <string>
 #include <tuple>
 #include <vector>
 
diff --git a/src/inspector/inspector.cc b/src/inspector/inspector.cc
index 9a5e90a..39b9e59 100644
--- a/src/inspector/inspector.cc
+++ b/src/inspector/inspector.cc
@@ -16,6 +16,7 @@
 
 #include <algorithm>
 #include <map>
+#include <utility>
 
 #include "src/ast/bool_literal.h"
 #include "src/ast/constructor_expression.h"
diff --git a/src/inspector/inspector_test.cc b/src/inspector/inspector_test.cc
index dbdaf93..e621557 100644
--- a/src/inspector/inspector_test.cc
+++ b/src/inspector/inspector_test.cc
@@ -14,6 +14,8 @@
 
 #include "src/inspector/inspector.h"
 
+#include <utility>
+
 #include "gtest/gtest.h"
 #include "src/ast/assignment_statement.h"
 #include "src/ast/bool_literal.h"
@@ -52,7 +54,6 @@
 #include "src/ast/workgroup_decoration.h"
 #include "src/context.h"
 #include "src/type_determiner.h"
-
 #include "tint/tint.h"
 
 namespace tint {
diff --git a/src/reader/spirv/function_call_test.cc b/src/reader/spirv/function_call_test.cc
index 934bb5c..e2ab099 100644
--- a/src/reader/spirv/function_call_test.cc
+++ b/src/reader/spirv/function_call_test.cc
@@ -12,12 +12,11 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-#include "src/reader/spirv/function.h"
-
 #include <string>
 #include <vector>
 
 #include "gmock/gmock.h"
+#include "src/reader/spirv/function.h"
 #include "src/reader/spirv/parser_impl.h"
 #include "src/reader/spirv/parser_impl_test_helper.h"
 #include "src/reader/spirv/spirv_tools_helpers_test.h"
diff --git a/src/reader/spirv/function_cfg_test.cc b/src/reader/spirv/function_cfg_test.cc
index 0a2db84..ea3b0a1 100644
--- a/src/reader/spirv/function_cfg_test.cc
+++ b/src/reader/spirv/function_cfg_test.cc
@@ -643,7 +643,7 @@
 
 TEST_F(
     SpvParserTest,
-    RegisterMerges_GoodLoopMerge_MultiBlockLoop_ContinueIsNotHeader_BranchConditional) {
+    RegisterMerges_GoodLoopMerge_MultiBlockLoop_ContinueIsNotHeader_BranchConditional) {  // NOLINT
   auto* p = parser(test::Assemble(CommonTypes() + R"(
      %100 = OpFunction %void None %voidfn
 
@@ -4570,7 +4570,7 @@
 
 TEST_F(
     SpvParserTest,
-    ClassifyCFGEdges_BackEdge_MultiBlockLoop_MultiBlockContinueConstruct_ContinueIsNotHeader) {
+    ClassifyCFGEdges_BackEdge_MultiBlockLoop_MultiBlockContinueConstruct_ContinueIsNotHeader) {  // NOLINT
   auto assembly = CommonTypes() + R"(
      %100 = OpFunction %void None %voidfn
 
@@ -4606,7 +4606,7 @@
 
 TEST_F(
     SpvParserTest,
-    ClassifyCFGEdges_BackEdge_MultiBlockLoop_MultiBlockContinueConstruct_ContinueIsHeader) {
+    ClassifyCFGEdges_BackEdge_MultiBlockLoop_MultiBlockContinueConstruct_ContinueIsHeader) {  // NOLINT
   auto assembly = CommonTypes() + R"(
      %100 = OpFunction %void None %voidfn
 
diff --git a/src/reader/spirv/parser_impl_module_var_test.cc b/src/reader/spirv/parser_impl_module_var_test.cc
index f829fff..3f6fe8e 100644
--- a/src/reader/spirv/parser_impl_module_var_test.cc
+++ b/src/reader/spirv/parser_impl_module_var_test.cc
@@ -1460,7 +1460,7 @@
 
 TEST_F(
     SpvParserTest,
-    ModuleScopeVar_StorageBuffer_NonWritable_NotAllMembers_DuplicatedOnSameMember) {
+    ModuleScopeVar_StorageBuffer_NonWritable_NotAllMembers_DuplicatedOnSameMember) {  // NOLINT
   // Variable should have access(read_write)
   auto* p = parser(test::Assemble(R"(
      OpName %myvar "myvar"
diff --git a/src/reader/wgsl/parser.cc b/src/reader/wgsl/parser.cc
index 0227e7e..3b41c09 100644
--- a/src/reader/wgsl/parser.cc
+++ b/src/reader/wgsl/parser.cc
@@ -14,6 +14,8 @@
 
 #include "src/reader/wgsl/parser.h"
 
+#include <utility>
+
 #include "src/reader/wgsl/parser_impl.h"
 
 namespace tint {
diff --git a/src/reader/wgsl/parser_impl_for_stmt_test.cc b/src/reader/wgsl/parser_impl_for_stmt_test.cc
index 44704b4..f0b2435 100644
--- a/src/reader/wgsl/parser_impl_for_stmt_test.cc
+++ b/src/reader/wgsl/parser_impl_for_stmt_test.cc
@@ -12,12 +12,12 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+#include <string>
+
 #include "gtest/gtest.h"
 #include "src/reader/wgsl/parser_impl.h"
 #include "src/reader/wgsl/parser_impl_test_helper.h"
 
-#include <string>
-
 namespace tint {
 namespace reader {
 namespace wgsl {
diff --git a/src/reader/wgsl/parser_impl_test_helper.h b/src/reader/wgsl/parser_impl_test_helper.h
index cbefc11..d8d5652 100644
--- a/src/reader/wgsl/parser_impl_test_helper.h
+++ b/src/reader/wgsl/parser_impl_test_helper.h
@@ -17,6 +17,8 @@
 
 #include <memory>
 #include <string>
+#include <utility>
+#include <vector>
 
 #include "gtest/gtest.h"
 #include "src/context.h"
diff --git a/src/source.cc b/src/source.cc
index d148453..bd45fd5 100644
--- a/src/source.cc
+++ b/src/source.cc
@@ -12,9 +12,10 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-#include <sstream>
+#include "src/source.h"
 
-#include "source.h"
+#include <sstream>
+#include <utility>
 
 namespace tint {
 namespace {
diff --git a/src/transform/bound_array_accessors_transform.cc b/src/transform/bound_array_accessors_transform.cc
index f0f6985..78f139e 100644
--- a/src/transform/bound_array_accessors_transform.cc
+++ b/src/transform/bound_array_accessors_transform.cc
@@ -14,6 +14,9 @@
 
 #include "src/transform/bound_array_accessors_transform.h"
 
+#include <memory>
+#include <utility>
+
 #include "src/ast/assignment_statement.h"
 #include "src/ast/binary_expression.h"
 #include "src/ast/bitcast_expression.h"
diff --git a/src/transform/bound_array_accessors_transform.h b/src/transform/bound_array_accessors_transform.h
index 5fe2fbb..f67834b 100644
--- a/src/transform/bound_array_accessors_transform.h
+++ b/src/transform/bound_array_accessors_transform.h
@@ -15,6 +15,8 @@
 #ifndef SRC_TRANSFORM_BOUND_ARRAY_ACCESSORS_TRANSFORM_H_
 #define SRC_TRANSFORM_BOUND_ARRAY_ACCESSORS_TRANSFORM_H_
 
+#include <string>
+
 #include "src/ast/array_accessor_expression.h"
 #include "src/ast/expression.h"
 #include "src/ast/module.h"
@@ -23,8 +25,6 @@
 #include "src/scope_stack.h"
 #include "src/transform/transformer.h"
 
-#include <string>
-
 namespace tint {
 namespace transform {
 
diff --git a/src/transform/bound_array_accessors_transform_test.cc b/src/transform/bound_array_accessors_transform_test.cc
index b235a14..cf013a7 100644
--- a/src/transform/bound_array_accessors_transform_test.cc
+++ b/src/transform/bound_array_accessors_transform_test.cc
@@ -15,6 +15,7 @@
 #include "src/transform/bound_array_accessors_transform.h"
 
 #include <memory>
+#include <utility>
 
 #include "gtest/gtest.h"
 #include "src/ast/array_accessor_expression.h"
diff --git a/src/transform/manager.h b/src/transform/manager.h
index 538e4cf..2848ec9 100644
--- a/src/transform/manager.h
+++ b/src/transform/manager.h
@@ -17,6 +17,8 @@
 
 #include <memory>
 #include <string>
+#include <utility>
+#include <vector>
 
 #include "src/transform/transformer.h"
 
diff --git a/src/transform/vertex_pulling_transform.cc b/src/transform/vertex_pulling_transform.cc
index 45fe5d3..3ab074d 100644
--- a/src/transform/vertex_pulling_transform.cc
+++ b/src/transform/vertex_pulling_transform.cc
@@ -14,6 +14,8 @@
 
 #include "src/transform/vertex_pulling_transform.h"
 
+#include <utility>
+
 #include "src/ast/array_accessor_expression.h"
 #include "src/ast/assignment_statement.h"
 #include "src/ast/binary_expression.h"
diff --git a/src/transform/vertex_pulling_transform.h b/src/transform/vertex_pulling_transform.h
index 805f751..16eace9 100644
--- a/src/transform/vertex_pulling_transform.h
+++ b/src/transform/vertex_pulling_transform.h
@@ -15,6 +15,11 @@
 #ifndef SRC_TRANSFORM_VERTEX_PULLING_TRANSFORM_H_
 #define SRC_TRANSFORM_VERTEX_PULLING_TRANSFORM_H_
 
+#include <memory>
+#include <string>
+#include <unordered_map>
+#include <vector>
+
 #include "src/ast/expression.h"
 #include "src/ast/function.h"
 #include "src/ast/module.h"
@@ -23,11 +28,6 @@
 #include "src/context.h"
 #include "src/transform/transformer.h"
 
-#include <memory>
-#include <string>
-#include <unordered_map>
-#include <vector>
-
 namespace tint {
 namespace transform {
 
diff --git a/src/transform/vertex_pulling_transform_test.cc b/src/transform/vertex_pulling_transform_test.cc
index 3b71cd7..9d13b98 100644
--- a/src/transform/vertex_pulling_transform_test.cc
+++ b/src/transform/vertex_pulling_transform_test.cc
@@ -14,6 +14,8 @@
 
 #include "src/transform/vertex_pulling_transform.h"
 
+#include <utility>
+
 #include "gtest/gtest.h"
 #include "src/ast/decorated_variable.h"
 #include "src/ast/function.h"
diff --git a/src/type_determiner.cc b/src/type_determiner.cc
index 0e5656d..6a8532a 100644
--- a/src/type_determiner.cc
+++ b/src/type_determiner.cc
@@ -552,8 +552,8 @@
     return true;
   }
   if (ast::intrinsic::IsTextureIntrinsic(ident->intrinsic())) {
-    // TODO: Remove the LOD param from textureLoad on storage textures when
-    // https://github.com/gpuweb/gpuweb/pull/1032 gets merged.
+    // TODO(dsinclair): Remove the LOD param from textureLoad on storage
+    // textures when https://github.com/gpuweb/gpuweb/pull/1032 gets merged.
     uint32_t num_of_params =
         (ident->intrinsic() == ast::Intrinsic::kTextureLoad ||
          ident->intrinsic() == ast::Intrinsic::kTextureSample)
diff --git a/src/type_determiner.h b/src/type_determiner.h
index 30fc548..1384028 100644
--- a/src/type_determiner.h
+++ b/src/type_determiner.h
@@ -17,6 +17,7 @@
 
 #include <string>
 #include <unordered_map>
+#include <vector>
 
 #include "src/ast/module.h"
 #include "src/ast/type/storage_texture_type.h"
diff --git a/src/validator.cc b/src/validator.cc
index 3186d9e..5af8414 100644
--- a/src/validator.cc
+++ b/src/validator.cc
@@ -13,6 +13,7 @@
 // limitations under the License.
 
 #include "src/validator.h"
+
 #include "src/validator_impl.h"
 
 namespace tint {
diff --git a/src/validator_control_block_test.cc b/src/validator_control_block_test.cc
index 1489ce5..9baa0f0 100644
--- a/src/validator_control_block_test.cc
+++ b/src/validator_control_block_test.cc
@@ -12,8 +12,6 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-#include "src/validator_impl.h"
-
 #include "gtest/gtest.h"
 #include "spirv/unified1/GLSL.std.450.h"
 #include "src/ast/case_statement.h"
@@ -30,6 +28,7 @@
 #include "src/ast/variable.h"
 #include "src/ast/variable_decl_statement.h"
 #include "src/type_determiner.h"
+#include "src/validator_impl.h"
 #include "src/validator_test_helper.h"
 
 namespace tint {
diff --git a/src/validator_function_test.cc b/src/validator_function_test.cc
index 4fb9ad5..d147dcc 100644
--- a/src/validator_function_test.cc
+++ b/src/validator_function_test.cc
@@ -12,8 +12,6 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-#include "src/validator_impl.h"
-
 #include "gtest/gtest.h"
 #include "spirv/unified1/GLSL.std.450.h"
 #include "src/ast/call_statement.h"
@@ -28,6 +26,7 @@
 #include "src/ast/variable.h"
 #include "src/ast/variable_decl_statement.h"
 #include "src/type_determiner.h"
+#include "src/validator_impl.h"
 #include "src/validator_test_helper.h"
 
 namespace tint {
diff --git a/src/validator_test.cc b/src/validator_test.cc
index a5236e2..741e432 100644
--- a/src/validator_test.cc
+++ b/src/validator_test.cc
@@ -12,8 +12,6 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-#include "src/validator_impl.h"
-
 #include "gtest/gtest.h"
 #include "spirv/unified1/GLSL.std.450.h"
 #include "src/ast/array_accessor_expression.h"
@@ -54,6 +52,7 @@
 #include "src/ast/variable.h"
 #include "src/ast/variable_decl_statement.h"
 #include "src/type_determiner.h"
+#include "src/validator_impl.h"
 #include "src/validator_test_helper.h"
 
 namespace tint {
diff --git a/src/validator_test_helper.cc b/src/validator_test_helper.cc
index 0658e09..39c667b 100644
--- a/src/validator_test_helper.cc
+++ b/src/validator_test_helper.cc
@@ -13,6 +13,9 @@
 // limitations under the License.
 
 #include "src/validator_test_helper.h"
+
+#include <memory>
+
 #include "src/type_manager.h"
 
 namespace tint {
diff --git a/src/validator_test_helper.h b/src/validator_test_helper.h
index 2459eb7..c5ac671 100644
--- a/src/validator_test_helper.h
+++ b/src/validator_test_helper.h
@@ -15,6 +15,8 @@
 #ifndef SRC_VALIDATOR_TEST_HELPER_H_
 #define SRC_VALIDATOR_TEST_HELPER_H_
 
+#include <memory>
+
 #include "src/ast/type/void_type.h"
 #include "src/type_determiner.h"
 #include "src/validator_impl.h"
diff --git a/src/writer/hlsl/generator_impl.cc b/src/writer/hlsl/generator_impl.cc
index 7c3ed46..151ec79 100644
--- a/src/writer/hlsl/generator_impl.cc
+++ b/src/writer/hlsl/generator_impl.cc
@@ -14,7 +14,10 @@
 
 #include "src/writer/hlsl/generator_impl.h"
 
+#include <limits>
 #include <sstream>
+#include <utility>
+#include <vector>
 
 #include "src/ast/array_accessor_expression.h"
 #include "src/ast/assignment_statement.h"
diff --git a/src/writer/hlsl/generator_impl.h b/src/writer/hlsl/generator_impl.h
index 9f3529a..d106b66 100644
--- a/src/writer/hlsl/generator_impl.h
+++ b/src/writer/hlsl/generator_impl.h
@@ -15,6 +15,9 @@
 #ifndef SRC_WRITER_HLSL_GENERATOR_IMPL_H_
 #define SRC_WRITER_HLSL_GENERATOR_IMPL_H_
 
+#include <string>
+#include <unordered_map>
+
 #include "src/ast/intrinsic.h"
 #include "src/ast/literal.h"
 #include "src/ast/module.h"
diff --git a/src/writer/hlsl/generator_impl_constructor_test.cc b/src/writer/hlsl/generator_impl_constructor_test.cc
index 6f47277..4211ee8 100644
--- a/src/writer/hlsl/generator_impl_constructor_test.cc
+++ b/src/writer/hlsl/generator_impl_constructor_test.cc
@@ -65,7 +65,8 @@
 TEST_F(HlslGeneratorImplTest_Constructor, EmitConstructor_Float) {
   ast::type::F32Type f32;
   // Use a number close to 1<<30 but whose decimal representation ends in 0.
-  auto lit = std::make_unique<ast::FloatLiteral>(&f32, float((1 << 30) - 4));
+  auto lit = std::make_unique<ast::FloatLiteral>(
+      &f32, static_cast<float>((1 << 30) - 4));
   ast::ScalarConstructorExpression expr(std::move(lit));
 
   ASSERT_TRUE(gen().EmitConstructor(pre(), out(), &expr)) << gen().error();
diff --git a/src/writer/hlsl/generator_impl_function_entry_point_data_test.cc b/src/writer/hlsl/generator_impl_function_entry_point_data_test.cc
index 04eca18..c22dfe4 100644
--- a/src/writer/hlsl/generator_impl_function_entry_point_data_test.cc
+++ b/src/writer/hlsl/generator_impl_function_entry_point_data_test.cc
@@ -12,6 +12,8 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+#include <memory>
+
 #include "src/ast/assignment_statement.h"
 #include "src/ast/decorated_variable.h"
 #include "src/ast/identifier_expression.h"
@@ -30,8 +32,6 @@
 #include "src/type_determiner.h"
 #include "src/writer/hlsl/test_helper.h"
 
-#include <memory>
-
 namespace tint {
 namespace writer {
 namespace hlsl {
diff --git a/src/writer/hlsl/generator_impl_function_test.cc b/src/writer/hlsl/generator_impl_function_test.cc
index c83247f..a2a11b6 100644
--- a/src/writer/hlsl/generator_impl_function_test.cc
+++ b/src/writer/hlsl/generator_impl_function_test.cc
@@ -564,7 +564,7 @@
 
 TEST_F(
     HlslGeneratorImplTest_Function,
-    Emit_FunctionDecoration_Called_By_EntryPoints_WithLocationGlobals_And_Params) {
+    Emit_FunctionDecoration_Called_By_EntryPoints_WithLocationGlobals_And_Params) {  // NOLINT
   ast::type::VoidType void_type;
   ast::type::F32Type f32;
 
@@ -731,7 +731,7 @@
 
 TEST_F(
     HlslGeneratorImplTest_Function,
-    Emit_FunctionDecoration_Called_By_EntryPoints_WithBuiltinGlobals_And_Params) {
+    Emit_FunctionDecoration_Called_By_EntryPoints_WithBuiltinGlobals_And_Params) {  // NOLINT
   ast::type::VoidType void_type;
   ast::type::F32Type f32;
   ast::type::VectorType vec4(&f32, 4);
diff --git a/src/writer/hlsl/generator_impl_member_accessor_test.cc b/src/writer/hlsl/generator_impl_member_accessor_test.cc
index 5faa38d..efdf970 100644
--- a/src/writer/hlsl/generator_impl_member_accessor_test.cc
+++ b/src/writer/hlsl/generator_impl_member_accessor_test.cc
@@ -1041,7 +1041,7 @@
 
 TEST_F(
     HlslGeneratorImplTest_MemberAccessor,
-    EmitExpression_MemberAccessor_StorageBuffer_Load_MultiLevel_Swizzle_SingleLetter) {
+    EmitExpression_MemberAccessor_StorageBuffer_Load_MultiLevel_Swizzle_SingleLetter) {  // NOLINT
   // struct Data {
   //   [[offset(0)]] a : vec3<i32>;
   //   [[offset(16)]] b : vec3<f32>;
diff --git a/src/writer/hlsl/namer_test.cc b/src/writer/hlsl/namer_test.cc
index cd5a1ce..adb2ee5 100644
--- a/src/writer/hlsl/namer_test.cc
+++ b/src/writer/hlsl/namer_test.cc
@@ -13,6 +13,7 @@
 // limitations under the License.
 
 #include "src/writer/hlsl/namer.h"
+
 #include "gtest/gtest.h"
 
 namespace tint {
diff --git a/src/writer/hlsl/test_helper.h b/src/writer/hlsl/test_helper.h
index 99d5f98..93dcca2 100644
--- a/src/writer/hlsl/test_helper.h
+++ b/src/writer/hlsl/test_helper.h
@@ -16,6 +16,7 @@
 #define SRC_WRITER_HLSL_TEST_HELPER_H_
 
 #include <sstream>
+#include <string>
 
 #include "gtest/gtest.h"
 #include "src/ast/module.h"
diff --git a/src/writer/msl/generator_impl.cc b/src/writer/msl/generator_impl.cc
index 6693d7f..b56bd7f 100644
--- a/src/writer/msl/generator_impl.cc
+++ b/src/writer/msl/generator_impl.cc
@@ -14,6 +14,11 @@
 
 #include "src/writer/msl/generator_impl.h"
 
+#include <algorithm>
+#include <limits>
+#include <utility>
+#include <vector>
+
 #include "src/ast/array_accessor_expression.h"
 #include "src/ast/assignment_statement.h"
 #include "src/ast/binary_expression.h"
diff --git a/src/writer/msl/generator_impl_constructor_test.cc b/src/writer/msl/generator_impl_constructor_test.cc
index 13fc4eb..38132e1 100644
--- a/src/writer/msl/generator_impl_constructor_test.cc
+++ b/src/writer/msl/generator_impl_constructor_test.cc
@@ -72,7 +72,8 @@
 TEST_F(MslGeneratorImplTest, EmitConstructor_Float) {
   ast::type::F32Type f32;
   // Use a number close to 1<<30 but whose decimal representation ends in 0.
-  auto lit = std::make_unique<ast::FloatLiteral>(&f32, float((1 << 30) - 4));
+  auto lit = std::make_unique<ast::FloatLiteral>(
+      &f32, static_cast<float>((1 << 30) - 4));
   ast::ScalarConstructorExpression expr(std::move(lit));
 
   ast::Module m;
diff --git a/src/writer/msl/generator_impl_function_entry_point_data_test.cc b/src/writer/msl/generator_impl_function_entry_point_data_test.cc
index 29cddd2..f404627 100644
--- a/src/writer/msl/generator_impl_function_entry_point_data_test.cc
+++ b/src/writer/msl/generator_impl_function_entry_point_data_test.cc
@@ -12,6 +12,8 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+#include <memory>
+
 #include "gtest/gtest.h"
 #include "src/ast/assignment_statement.h"
 #include "src/ast/decorated_variable.h"
@@ -30,8 +32,6 @@
 #include "src/type_determiner.h"
 #include "src/writer/msl/generator_impl.h"
 
-#include <memory>
-
 namespace tint {
 namespace writer {
 namespace msl {
diff --git a/src/writer/msl/generator_impl_function_test.cc b/src/writer/msl/generator_impl_function_test.cc
index 8959a68..86d2d31 100644
--- a/src/writer/msl/generator_impl_function_test.cc
+++ b/src/writer/msl/generator_impl_function_test.cc
@@ -485,7 +485,7 @@
 
 TEST_F(
     MslGeneratorImplTest,
-    Emit_FunctionDecoration_Called_By_EntryPoints_WithLocationGlobals_And_Params) {
+    Emit_FunctionDecoration_Called_By_EntryPoints_WithLocationGlobals_And_Params) {  // NOLINT
   ast::type::VoidType void_type;
   ast::type::F32Type f32;
 
@@ -666,7 +666,7 @@
 
 TEST_F(
     MslGeneratorImplTest,
-    Emit_FunctionDecoration_Called_By_EntryPoints_WithBuiltinGlobals_And_Params) {
+    Emit_FunctionDecoration_Called_By_EntryPoints_WithBuiltinGlobals_And_Params) {  // NOLINT
   ast::type::VoidType void_type;
   ast::type::F32Type f32;
   ast::type::VectorType vec4(&f32, 4);
diff --git a/src/writer/msl/generator_impl_test.cc b/src/writer/msl/generator_impl_test.cc
index cfbeef0..7e21912 100644
--- a/src/writer/msl/generator_impl_test.cc
+++ b/src/writer/msl/generator_impl_test.cc
@@ -15,6 +15,7 @@
 #include "src/writer/msl/generator_impl.h"
 
 #include <memory>
+#include <utility>
 
 #include "gtest/gtest.h"
 #include "src/ast/function.h"
diff --git a/src/writer/msl/namer_test.cc b/src/writer/msl/namer_test.cc
index 3c30fa0..56203a4 100644
--- a/src/writer/msl/namer_test.cc
+++ b/src/writer/msl/namer_test.cc
@@ -13,6 +13,7 @@
 // limitations under the License.
 
 #include "src/writer/msl/namer.h"
+
 #include "gtest/gtest.h"
 
 namespace tint {
diff --git a/src/writer/spirv/builder.cc b/src/writer/spirv/builder.cc
index 5cf43ee..1903704 100644
--- a/src/writer/spirv/builder.cc
+++ b/src/writer/spirv/builder.cc
@@ -13,6 +13,7 @@
 
 #include "src/writer/spirv/builder.h"
 
+#include <iostream>
 #include <limits>
 #include <sstream>
 #include <utility>
@@ -69,8 +70,6 @@
 #include "src/ast/unary_op_expression.h"
 #include "src/ast/variable_decl_statement.h"
 
-#include <iostream>
-
 namespace tint {
 namespace writer {
 namespace spirv {
@@ -1866,8 +1865,8 @@
   auto* texture_type =
       call->params()[0].get()->result_type()->UnwrapAll()->AsTexture();
 
-  // TODO: Remove the LOD param from textureLoad on storage textures when
-  // https://github.com/gpuweb/gpuweb/pull/1032 gets merged.
+  // TODO(dsinclair): Remove the LOD param from textureLoad on storage textures
+  // when https://github.com/gpuweb/gpuweb/pull/1032 gets merged.
   if (ident->intrinsic() == ast::Intrinsic::kTextureLoad) {
     std::vector<Operand> spirv_params = {
         std::move(wgsl_params[0]), std::move(wgsl_params[1]),
diff --git a/src/writer/spirv/builder_function_decoration_test.cc b/src/writer/spirv/builder_function_decoration_test.cc
index 26cfcf2..dc8b785 100644
--- a/src/writer/spirv/builder_function_decoration_test.cc
+++ b/src/writer/spirv/builder_function_decoration_test.cc
@@ -74,7 +74,7 @@
   ASSERT_TRUE(b.GenerateFunction(&func)) << b.error();
 
   auto preamble = b.entry_points();
-  ASSERT_TRUE(preamble.size() >= 1u);
+  ASSERT_GE(preamble.size(), 1u);
   EXPECT_EQ(preamble[0].opcode(), spv::Op::OpEntryPoint);
 
   ASSERT_GE(preamble[0].operands().size(), 3u);
diff --git a/src/writer/spirv/generator.h b/src/writer/spirv/generator.h
index c907ef3..f5968b2 100644
--- a/src/writer/spirv/generator.h
+++ b/src/writer/spirv/generator.h
@@ -16,6 +16,7 @@
 #define SRC_WRITER_SPIRV_GENERATOR_H_
 
 #include <memory>
+#include <string>
 #include <vector>
 
 #include "src/ast/module.h"
diff --git a/src/writer/wgsl/generator_impl_constructor_test.cc b/src/writer/wgsl/generator_impl_constructor_test.cc
index 9ce40ec..ef21cac 100644
--- a/src/writer/wgsl/generator_impl_constructor_test.cc
+++ b/src/writer/wgsl/generator_impl_constructor_test.cc
@@ -67,7 +67,8 @@
 TEST_F(WgslGeneratorImplTest, EmitConstructor_Float) {
   ast::type::F32Type f32;
   // Use a number close to 1<<30 but whose decimal representation ends in 0.
-  auto lit = std::make_unique<ast::FloatLiteral>(&f32, float((1 << 30) - 4));
+  auto lit = std::make_unique<ast::FloatLiteral>(
+      &f32, static_cast<float>((1 << 30) - 4));
   ast::ScalarConstructorExpression expr(std::move(lit));
 
   GeneratorImpl g;
diff --git a/tools/lint b/tools/lint
index 35d88d4..0157fa6 100755
--- a/tools/lint
+++ b/tools/lint
@@ -15,5 +15,6 @@
 
 set -e  # fail on error
 
-./third_party/cpplint/cpplint/cpplint.py --root=. `find src -type f`
-./third_party/cpplint/cpplint/cpplint.py --root=. `find samples -type f`
+FILTER="-runtime/references"
+./third_party/cpplint/cpplint/cpplint.py --root=. --filter="$FILTER" `find src -type f`
+./third_party/cpplint/cpplint/cpplint.py --root=. --filter="$FILTER" `find samples -type f`