Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use -Werror by default #132

Merged
merged 1 commit into from
Aug 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ of how they look:

sensei -isrc -itest test/Spec.hs -- --no-color --match foo

### Warnings and errors

By default, `sensei` treats warnings as errors. You can pass `-Wwarn` on the
command line to prevent this behavior. However, consider to adjust the warning
behavior instead (e.g. through `-w`, `-Wdefault`, `-Wall`).

### Boring files

When `sensei` is used inside a Git repository, it ignores modifications to
Expand All @@ -31,7 +37,7 @@ When `sensei` is used inside a Git repository, it ignores modifications to

cabal exec sensei test/Spec.hs

## 生徒 (*rōmaji*: seito): Accessing results on the command-line
## 生徒 (*rōmaji*: seito): Accessing results on the command line

You can access the results of the last test run with `seito`:

Expand Down
2 changes: 1 addition & 1 deletion src/Session.hs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ hspecPreviousSummary session = liftIO $ readIORef session.hspecPreviousSummaryRe

withSession :: Config -> [String] -> (Session -> IO r) -> IO r
withSession config args action = do
withInterpreter config ghciArgs $ \ ghci -> do
withInterpreter config ("-Werror" : ghciArgs) $ \ ghci -> do
ref <- newIORef (Just $ Summary 0 0)
action (Session ghci hspecArgs ref)
where
Expand Down
Loading