Skip to content

Commit

Permalink
Upgrade elp_lint to latest available version
Browse files Browse the repository at this point in the history
Summary:
This was achieved by upgrading the linter to the latest upstream version and by re-applying the following changes.

* [Do not check behaviours](https://www.internalfb.com/phabricator/commit/FBS/d50b6e707a059cbd14260990360d3ed89fb1437a)
* [Avoid crash on empty/new files](https://www.internalfb.com/phabricator/commit/FBS/9cdab82da91ecccd0d219821fc433cc2fd7c8b0c)
* [Do not attempt to lint headers](https://www.internalfb.com/diff/D42917670)

Every other local change to the fork was deemed un-necessary (e.g. support for structured comments was added, then removed)

In addition to that, the module was made OTP-26 compatible by:

* Adding back the explicit enabling for the `maybe` feature
* Stripping away documentation attributes (using triple-quoted strings)
* Reverting [this change](erlang/otp@5343ed1) which relied on sigils

The new linter raised a few warnings in WASERVER which were fixed in D57721417.

Reviewed By: alanz

Differential Revision: D57713233

fbshipit-source-id: a03c3b7034da071f82dcf23cf963fabbce39c1b9
  • Loading branch information
robertoaloi authored and facebook-github-bot committed Jun 26, 2024
1 parent 90398cb commit 95b4ccb
Show file tree
Hide file tree
Showing 3 changed files with 236 additions and 59 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
module specified: erlang_diagnostics_force_warn_missing_spec_all
Diagnostics reported in 1 modules:
erlang_diagnostics_force_warn_missing_spec_all: 1
8:0-8:12::[Warning] [L1309] missing specification for function not_exported/0
No errors reported
Original file line number Diff line number Diff line change
Expand Up @@ -34,18 +34,7 @@ STUB


WARNINGS
[
ParseError {
path: "fixtures/override_warn_missing_spec_all.erl",
location: Some(
Normal(
144..164,
),
),
msg: "missing specification for function not_exported/0",
code: "L1309",
},
]
[]

ERRORS
[]
Loading

0 comments on commit 95b4ccb

Please sign in to comment.