1
1
mirror of https://github.com/github/semantic.git synced 2024-11-22 23:29:37 +03:00

use the same GHC warnings everywhere

This commit is contained in:
Patrick Thomson 2020-06-23 09:45:10 -04:00
parent 5f7f9e325b
commit 801ef3bfc3
15 changed files with 71 additions and 5 deletions

View File

@ -1,6 +1,7 @@
# This file lets us share warnings and such across the project
STANDARD_GHC_WARNINGS = [
"-O0",
"-Weverything",
"-Wno-missing-local-signatures",
"-Wno-missing-import-lists",

View File

@ -13,6 +13,10 @@ load(
"haskell_cabal_binary",
"haskell_cabal_library",
)
load(
"//:build/common.bzl",
"STANDARD_GHC_WARNINGS",
)
# haskell_toolchain_library can access builtin GHC packages
# and assign them a bazel target name, so that they
@ -23,7 +27,7 @@ haskell_toolchain_library(name = "base")
haskell_library(
name = "lib",
srcs = glob(["src/**/*.hs"]),
compiler_flags = ["-XOverloadedStrings"],
compiler_flags = STANDARD_GHC_WARNINGS + ["-XOverloadedStrings"],
src_strip_prefix = "src",
deps = [
":base",

View File

@ -13,6 +13,10 @@ load(
"haskell_cabal_binary",
"haskell_cabal_library",
)
load(
"//:build/common.bzl",
"STANDARD_GHC_WARNINGS",
)
# haskell_toolchain_library can access builtin GHC packages
# and assign them a bazel target name, so that they
@ -23,7 +27,7 @@ haskell_toolchain_library(name = "base")
haskell_library(
name = "lib",
srcs = glob(["src/**/*.hs"]),
compiler_flags = ["-XOverloadedStrings"],
compiler_flags = STANDARD_GHC_WARNINGS + ["-XOverloadedStrings"],
src_strip_prefix = "src",
deps = [
":base",

View File

@ -13,6 +13,10 @@ load(
"haskell_cabal_binary",
"haskell_cabal_library",
)
load(
"//:build/common.bzl",
"STANDARD_GHC_WARNINGS",
)
# haskell_toolchain_library can access builtin GHC packages
# and assign them a bazel target name, so that they
@ -23,6 +27,7 @@ haskell_toolchain_library(name = "base")
haskell_library(
name = "lib",
srcs = glob(["src/**/*.hs"]),
compiler_flags = STANDARD_GHC_WARNINGS,
extra_srcs = ["//vendor:codeql-node-types.json"],
deps = [
":base",

View File

@ -13,6 +13,10 @@ load(
"haskell_cabal_binary",
"haskell_cabal_library",
)
load(
"//:build/common.bzl",
"STANDARD_GHC_WARNINGS",
)
# haskell_toolchain_library can access builtin GHC packages
# and assign them a bazel target name, so that they
@ -23,6 +27,7 @@ haskell_toolchain_library(name = "base")
haskell_library(
name = "lib",
srcs = glob(["src/**/*.hs"]),
compiler_flags = STANDARD_GHC_WARNINGS,
src_strip_prefix = "src",
deps = [
":base",

View File

@ -13,6 +13,10 @@ load(
"haskell_cabal_binary",
"haskell_cabal_library",
)
load(
"//:build/common.bzl",
"STANDARD_GHC_WARNINGS",
)
# haskell_toolchain_library can access builtin GHC packages
# and assign them a bazel target name, so that they
@ -23,6 +27,7 @@ haskell_toolchain_library(name = "base")
haskell_library(
name = "lib",
srcs = glob(["src/**/*.hs"]),
compiler_flags = STANDARD_GHC_WARNINGS,
extra_srcs = ["//vendor:go-node-types.json"],
deps = [
":base",

View File

@ -13,6 +13,10 @@ load(
"haskell_cabal_binary",
"haskell_cabal_library",
)
load(
"//:build/common.bzl",
"STANDARD_GHC_WARNINGS",
)
# haskell_toolchain_library can access builtin GHC packages
# and assign them a bazel target name, so that they
@ -23,6 +27,7 @@ haskell_toolchain_library(name = "base")
haskell_library(
name = "lib",
srcs = glob(["src/**/*.hs"]),
compiler_flags = STANDARD_GHC_WARNINGS,
extra_srcs = ["//vendor:java-node-types.json"],
deps = [
":base",

View File

@ -13,6 +13,10 @@ load(
"haskell_cabal_binary",
"haskell_cabal_library",
)
load(
"//:build/common.bzl",
"STANDARD_GHC_WARNINGS",
)
# haskell_toolchain_library can access builtin GHC packages
# and assign them a bazel target name, so that they
@ -23,6 +27,7 @@ haskell_toolchain_library(name = "base")
haskell_library(
name = "lib",
srcs = glob(["src/**/*.hs"]),
compiler_flags = STANDARD_GHC_WARNINGS,
extra_srcs = ["//vendor:php-node-types.json"],
deps = [
":base",

View File

@ -13,6 +13,10 @@ load(
"haskell_cabal_binary",
"haskell_cabal_library",
)
load(
"//:build/common.bzl",
"STANDARD_GHC_WARNINGS",
)
# haskell_toolchain_library can access builtin GHC packages
# and assign them a bazel target name, so that they
@ -23,6 +27,7 @@ haskell_toolchain_library(name = "base")
haskell_library(
name = "lib",
srcs = glob(["src/**/*.hs"]),
compiler_flags = STANDARD_GHC_WARNINGS,
extra_srcs = ["//vendor:python-node-types.json"],
deps = [
":base",

View File

@ -13,6 +13,10 @@ load(
"haskell_cabal_binary",
"haskell_cabal_library",
)
load(
"//:build/common.bzl",
"STANDARD_GHC_WARNINGS",
)
# haskell_toolchain_library can access builtin GHC packages
# and assign them a bazel target name, so that they
@ -23,6 +27,7 @@ haskell_toolchain_library(name = "base")
haskell_library(
name = "lib",
srcs = glob(["src/**/*.hs"]),
compiler_flags = STANDARD_GHC_WARNINGS,
extra_srcs = ["//vendor:ruby-node-types.json"],
src_strip_prefix = "src",
deps = [

View File

@ -13,6 +13,10 @@ load(
"haskell_cabal_binary",
"haskell_cabal_library",
)
load(
"//:build/common.bzl",
"STANDARD_GHC_WARNINGS",
)
# haskell_toolchain_library can access builtin GHC packages
# and assign them a bazel target name, so that they
@ -23,8 +27,7 @@ haskell_toolchain_library(name = "base")
haskell_library(
name = "lib",
srcs = glob(["src/**/*.hs"]),
compiler_flags = ["-XOverloadedStrings"],
src_strip_prefix = "src",
compiler_flags = STANDARD_GHC_WARNINGS + ["-XOverloadedStrings"],
deps = [
":base",
"//semantic-analysis:lib",

View File

@ -18,6 +18,10 @@ load(
"haskell_doctest",
"haskell_doctest_toolchain",
)
load(
"//:build/common.bzl",
"STANDARD_GHC_WARNINGS",
)
# haskell_toolchain_library can access builtin GHC packages
# and assign them a bazel target name, so that they
@ -27,7 +31,7 @@ haskell_toolchain_library(name = "base")
haskell_library(
name = "lib",
srcs = glob(["src/**/*.hs"]),
compiler_flags = ["-XOverloadedStrings"],
compiler_flags = STANDARD_GHC_WARNINGS + ["-XOverloadedStrings"],
src_strip_prefix = "src",
deps = [
":base",

View File

@ -13,6 +13,10 @@ load(
"haskell_cabal_binary",
"haskell_cabal_library",
)
load(
"//:build/common.bzl",
"STANDARD_GHC_WARNINGS",
)
# haskell_toolchain_library can access builtin GHC packages
# and assign them a bazel target name, so that they
@ -23,6 +27,7 @@ haskell_toolchain_library(name = "base")
haskell_library(
name = "lib",
srcs = glob(["src/**/*.hs"]),
compiler_flags = STANDARD_GHC_WARNINGS,
src_strip_prefix = "src",
deps = [
":base",

View File

@ -13,6 +13,10 @@ load(
"haskell_cabal_binary",
"haskell_cabal_library",
)
load(
"//:build/common.bzl",
"STANDARD_GHC_WARNINGS",
)
# haskell_toolchain_library can access builtin GHC packages
# and assign them a bazel target name, so that they
@ -23,6 +27,7 @@ haskell_toolchain_library(name = "base")
haskell_library(
name = "lib",
srcs = glob(["src/**/*.hs"]),
compiler_flags = STANDARD_GHC_WARNINGS,
extra_srcs = ["//vendor:tsx-node-types.json"],
deps = [
":base",

View File

@ -13,6 +13,10 @@ load(
"haskell_cabal_binary",
"haskell_cabal_library",
)
load(
"//:build/common.bzl",
"STANDARD_GHC_WARNINGS",
)
# haskell_toolchain_library can access builtin GHC packages
# and assign them a bazel target name, so that they
@ -23,6 +27,7 @@ haskell_toolchain_library(name = "base")
haskell_library(
name = "lib",
srcs = glob(["src/**/*.hs"]),
compiler_flags = STANDARD_GHC_WARNINGS,
extra_srcs = ["//vendor:tsx-node-types.json"],
deps = [
":base",