Commit Graph

152 Commits

Author SHA1 Message Date
Jeroen Engels
b654daa301 Remove unused code and dependencies 2020-01-15 09:54:26 +01:00
Jeroen Engels
acd63f22dd NoUnusedExports: Report unused types 2020-01-14 12:50:07 +01:00
Jeroen Engels
511db00e29 NoUnusedExports: Do not report elements that are not defined 2020-01-14 09:50:13 +01:00
Jeroen Engels
251bca2c12 Use Scope in NoUnusedExports to know about the exports from other modules 2020-01-14 09:50:13 +01:00
Jeroen Engels
c21fbff07e NoUnusedExports: Don't report used functions or values 2020-01-14 09:50:13 +01:00
Jeroen Engels
56e766ad62 Register type constructors from visited modules in Scope 2020-01-14 09:50:13 +01:00
Jeroen Engels
061a950679 Register types from visited modules in Scope 2020-01-14 09:50:13 +01:00
Jeroen Engels
6ca138db11 Register exposes values only if they are exposed 2020-01-14 09:50:13 +01:00
Jeroen Engels
0362f5b3e3 Register values from visited modules in Scope 2020-01-14 09:50:13 +01:00
Jeroen Engels
25601e6b24 Rework Scope to work for multi file rules 2020-01-14 09:50:13 +01:00
Jeroen Engels
13d845db25 Copy Scope 2020-01-14 09:50:13 +01:00
Jeroen Engels
dbf56e1e65 Add NoUnusedExports rule 2020-01-14 09:50:13 +01:00
Jeroen Engels
c2ea2f8136 Rename runMulti* to runOnModules* 2020-01-05 19:35:41 +01:00
Jeroen Engels
3bd94e4127 Replace expectErrorsForFiles by expectErrorsForModules 2020-01-05 18:44:16 +01:00
Jeroen Engels
c388770501 Have the tests explain which source code failed to parse when there are multiple 2020-01-05 11:04:20 +01:00
Jeroen Engels
a674ee4763 Do not consider a package module used when it contains a main function 2020-01-04 18:34:12 +01:00
Jeroen Engels
c3759a182d Add missing tests for NoUnusedModules 2020-01-04 15:12:00 +01:00
Jeroen Engels
6b371bf569 Fail tests when there are duplicate module names 2020-01-04 14:21:28 +01:00
Jeroen Engels
7b786d9a2d Add error message when the number of lists of errors is unexpected 2020-01-04 12:40:11 +01:00
Jeroen Engels
8fa9ab49a1 Add functions to be able to test multi rules 2020-01-03 17:12:43 +01:00
Jeroen Engels
6c7d2580cd Set the correct VariableType for ports 2019-12-07 15:29:20 +01:00
Jeroen Engels
fe7b3da438 Make scope understand case..of expressions 2019-11-27 22:30:01 +01:00
Jeroen Engels
4ad1d33d41 Make scope understand parameters 2019-11-27 00:17:14 +01:00
Jeroen Engels
581b77fd17 Make Scope understand exposing(Foo(..)) 2019-11-24 20:29:05 +01:00
Jeroen Engels
45861e3de7 Rename setter and getter fields for scope 2019-11-24 20:28:41 +01:00
Jeroen Engels
b8b6c6758c Make scope understand the elm/core prelude 2019-11-24 20:28:41 +01:00
Jeroen Engels
f6b5b0c4c3 Add tests for Scope 2019-11-24 20:28:41 +01:00
Jeroen Engels
a7c4b86a12 Push a new scope when entering a let..in block 2019-11-23 20:22:42 +01:00
Jeroen Engels
688eb3a1d1 Add test to make sure visitors are called in the expected order 2019-11-23 20:22:42 +01:00
Jeroen Engels
97d45987bd Call multiple declaration and expression visitors in reverse order on exit 2019-11-23 20:22:42 +01:00
Jeroen Engels
28e9dfc401 Make scope register top level variables 2019-11-22 00:00:13 +01:00
Jeroen Engels
0a9a4d8853 Make Scope understand exposing (..) 2019-11-20 11:16:37 +01:00
Jeroen Engels
75bb616686 Make Scope understand the exposing part when importing a module 2019-11-20 09:48:57 +01:00
Jeroen Engels
fad39c1397 Start working on a scope module
This module should help to write rules that detect the use of a given
function.
2019-11-20 09:48:57 +01:00
Jeroen Engels
5977bb06f2 Remove the Review.Util module 2019-09-29 10:51:29 +02:00
Jeroen Engels
8e48d01e66 Change the project's API from Lint* to Review* 2019-09-28 23:47:02 +02:00
Jeroen Engels
3645acb99e Reword the error message in the case of a missing fixes test failure 2019-09-17 19:56:15 +02:00
Jeroen Engels
b359fb3023 Add Lint.Rule.withDeclarationListVisitor function 2019-09-15 01:29:26 +02:00
Jeroen Engels
bf1f1d2380 Fix "across" typo accross the whole project 2019-08-29 22:45:28 +02:00
Jeroen Engels
011a205b13 Remove rules from the package 2019-08-28 08:36:24 +02:00
Jeroen Engels
ddaea22eab Move range manipulations fns out of Lint.Fix and into the rule that uses them 2019-08-22 19:48:46 +02:00
Jeroen Engels
5433526b2f Explain why we require providing the fix result in test error messages 2019-08-22 11:57:14 +02:00
Jeroen Engels
2c38878a6d Autofix all unused variables in NoUnusedVariables 2019-08-19 16:13:45 +02:00
Jeroen Engels
8fa510458e Fail applying a fix if ranges of the fixes overlap 2019-08-18 23:32:30 +02:00
Jeroen Engels
50f631c47c Add commented out tests for rangeUpUntil 2019-08-09 19:16:23 +02:00
Jeroen Engels
55fb6b71bb Improve NoUnusedVariables handles deleting the last declaration in a let in 2019-08-09 19:07:06 +02:00
Jeroen Engels
3b93133ada Fail applying a fix if the result becomes unparsable 2019-08-08 22:01:44 +02:00
Jeroen Engels
b7bbaff013 Fail the test with a helpful error message when fix does not change anything 2019-08-08 22:01:44 +02:00
Jeroen Engels
919467fee6 Add a way to check in tests that the fixed code is correct 2019-08-06 09:31:57 +02:00
Jeroen Engels
4eb024ef2e Make Lint.Fix.fix return a value that shows whether it was successful 2019-08-06 09:31:57 +02:00