-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
481080d
commit 2b49ac0
Showing
5 changed files
with
51 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import filepath | ||
import simplifile | ||
|
||
const review_file_name = "review.gleam" | ||
|
||
const init_setup_src = " | ||
import code_review | ||
import code_review/rules/no_panic | ||
import code_review/rules/no_unnecessary_string_concatenation | ||
import code_review/rules/no_trailing_underscore | ||
import code_review/rules/no_deprecated | ||
pub fn main() { | ||
let rules = [ | ||
no_panic.rule(), | ||
no_unnecessary_string_concatenation.rule(), | ||
no_trailing_underscore.rule(), | ||
no_deprecated.rule(), | ||
] | ||
code_review.main(rules) | ||
} | ||
" | ||
|
||
pub fn main() { | ||
let assert Ok(curr_dir) = simplifile.current_directory() | ||
let assert Ok(_) = | ||
simplifile.write( | ||
filepath.join(curr_dir, "test/" <> review_file_name), | ||
init_setup_src, | ||
) | ||
} |