Skip to content

Commit

Permalink
Diagnostics for oncall in header files - add detection
Browse files Browse the repository at this point in the history
Summary:
* We detect if an oncall attribute is in the header .hrl file
* For now we wonly display a message. Next diff will have the fix for this suggested too

Reviewed By: alanz

Differential Revision: D63696175

fbshipit-source-id: d14658dac38e9dd99a8a06dc77c80bed02407c50
  • Loading branch information
bgsmeta authored and facebook-github-bot committed Oct 8, 2024
1 parent 5496cc5 commit 4b73b7b
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions crates/ide/src/diagnostics/unused_include.rs
Original file line number Diff line number Diff line change
Expand Up @@ -590,23 +590,6 @@ foo() -> ok.
)
}

#[test]
fn not_used_for_oncall_attribute() {
check_diagnostics(
r#"
//- /src/main.erl
-module(main).
-include("header.hrl").
%%^^^^^^^^^^^^^^^^^^^^^^^ 💡 warning: Unused file: header.hrl
foo() -> ok.
//- /src/header.hrl
-oncall("mary").
"#,
)
}

#[test]
fn fixes_unused_include() {
check_fix(
Expand Down

0 comments on commit 4b73b7b

Please sign in to comment.