Skip to content

Commit

Permalink
Silly mistakes
Browse files Browse the repository at this point in the history
  • Loading branch information
5han7anu-S committed Mar 21, 2024
1 parent 2d567e3 commit c8977b5
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion md/syntaxrules-explanation-identifier_matches_filename.md
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
Hi
Module Identifier should have the same name as the file it's in.

```module Bar``` should be in ```some/path/to/Bar.sv```
1 change: 1 addition & 0 deletions src/syntaxrules/identifier_matches_filename.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ impl SyntaxRule for IdentifierMatchesFilename {
if let Some(file_name) = path.file_name().and_then(std::ffi::OsStr::to_str) {
if file_name.ends_with(".sv") {
let file_ident = file_name.trim_end_matches(".sv");

if module_name == file_ident {
found_matching_file = true;
break; // We found a match, no need to continue checking other files
Expand Down
2 changes: 1 addition & 1 deletion testcases/syntaxrules/pass/identifier_matches_filename.sv
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
module identifier_matches_filename;
endfunction
endmodule

0 comments on commit c8977b5

Please sign in to comment.