Commit Graph

17 Commits

Author SHA1 Message Date
Jan Hrcek
4985793137
Actually enable pedantic flag in ci flags job (#4224)
* Actually enable pedantic flag in ci flags job

* Address reviwe comments

* Fixes after rebase

* Tweak warning configs
2024-05-13 10:10:32 +01:00
Jan Hrcek
91098a4e5f
Reduce usage of partial functions (#4123) 2024-03-09 18:30:42 +01:00
Jan Hrcek
e37ec7dbb3
Enable pedantic for more components (#4061) 2024-02-09 15:17:34 +01:00
Jan Hrcek
0047d133a1
Fix warnings in hls-graph, enable pedantic in CI (#4047)
* Fix warnings in hls-graph, enable pedantic in CI

* Fix build with flags

* stylish-haskell

* Split Key stuff to separate module with explicit export list

* Try the cabal configure suggestion in CI flags job

* Newline fix

* Enable pedantic for all

* Typo

* stylish-haskell

* pedantic is already enabled for all

* Fix error in hls-plugin-api

* Address nitpick, use lsp-types in tests instead
2024-02-06 15:13:41 +00:00
Patrick Wales
4788bfca11
update hlint to 3.8 and prevent linting on testdata dir (#4018) 2024-01-26 15:17:11 +00:00
fendor
ccfc57b694
Don't run hlint on testdata directories (#3901)
* Don't run hlint on testdata directories

* Bump hlint version

* Remove quotes

* Ignore test data directories in .hlint.yaml

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: Michael Peyton Jones <me@michaelpj.com>
Co-authored-by: Patrick Wales <fwy996602672@gmail.com>
2024-01-16 12:57:25 +00:00
Nathan Maxson
8d7555ca2a
Better plugin error infrastructure (#3717)
---------

Co-authored-by: Fendor <power.walross@gmail.com>
2023-07-29 21:44:30 +00:00
Matthew Pickering
f63627fa81 Simplify implementation of eval plugin and make it work with GHC 9.4
The plugin was implemented by calling "load" which circumvents all of
HLSs caching mechanisms for interface files and linkables. Instead we
should work like the other typechecking functions which get all the
stuff we need using HLS rules and setup the HscEnv with all the state in
the right places.

The key part to this is setting up all the HPT modules with linkables if
they are depenedencies of the module we are trying to run a function
from.

- ban load functions from GHC driver

- Enable CI for hls-eval-plugin and fix a bug due to clearing of mi_globals
2023-02-22 06:33:22 +05:30
wz1000
00f4e61da6
Two recompilation avoidance related bugs (#3452)
1. Recompilation avoidance regresses in GHC 9.4 due to interactions between GHC and HLS's implementations.
   Avoid this by filtering out the information that causes the conflict
   See https://gitlab.haskell.org/ghc/ghc/-/issues/22744.

2. The recompilation avoidance info GHC stores in interfaces can blow up to be
   extremely large when deserialised from disk. See https://gitlab.haskell.org/ghc/ghc/-/issues/22744
   Deduplicate these filepaths.
2023-01-26 14:25:26 +00:00
Zubin Duggal
3b64a3b1c5 Introduce KeyMap and KeySet 2022-10-24 14:50:37 +05:30
Andy
21c8e9b83e
Hlint: A handful of fixes to hints (#3259)
* CI: rwe/actions-hlint-run v2

* fmt script: Fix missing directories

Otherwise will fail

* Hlint: Automatically fix warnings via apply-refact

* Hlint: Do not suggest fromMaybe

Co-authored-by: Michael Peyton Jones <me@michaelpj.com>
2022-10-10 11:47:42 +00:00
Zubin Duggal
163ebfe9d0 Fix hlint 2022-09-06 20:36:24 +05:30
Zubin Duggal
e03111921b Update hlint ignore 2022-08-31 00:56:35 +05:30
Michael Peyton Jones
fa868b5f34
Simplify hlint config (#3038)
Apparently I was just doing it wrong and naming multiple functions this
way does work properly!
2022-07-13 00:08:43 +01:00
Michael Peyton Jones
a32db0b296
Hlint more partial functions, and Debug.Trace (#3000)
* Add partial functions under alternative import names

* Ban tracing functions also

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-07-06 13:36:22 +00:00
Michael Peyton Jones
510bd51e46
Remove some partial functions from Shake.hs (#2986)
Also removes a partial pattern match from Action.hs.
2022-06-29 09:00:49 +01:00
Michael Peyton Jones
efcb8e2589
Set up partial functions ratchet (#2974)
* HLint partial functions

* Delete commented out stuff

* Delete flag-based warnings, unclear they add much

* Delete DA-specific hints

* Delete extra cpp args

* Delete extension options relating to dead build system

* Don't bother trying to restrict CPP for now, it's everywhere

* Make the hlint job fail if there are any errors

* Fix for rebase, add unsafePerformIO and fold1 variants

* Add some more indexing functions

* Try turning off hlint on this test file

* Add .hlint.yaml file for hls-hlint-plugin

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-06-24 10:46:35 +00:00