Skip to content

Commit c35d2fa

Browse files
committed
fix Perl warning
1 parent 3187c07 commit c35d2fa

File tree

4 files changed

+31
-4
lines changed

4 files changed

+31
-4
lines changed

.github/linters/.ruff.toml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
cache-dir = "/tmp/.ruff_cache"
2+
line-length = 120
3+
4+
[lint]
5+
# C0114: Missing module docstring (missing-module-docstring)
6+
# C0116: Missing function or method docstring (missing-function-docstring)
7+
# C0103: Constant name doesn't conform to UPPER_CASE naming style (invalid-name)
8+
# C0209: Formatting a regular string which could be an f-string (consider-using-f-string)
9+
# W0622: Redefining built-in 'copyright' (redefined-builtin)
10+
# R0801: Similar lines in 2 files
11+
ignore = ["C0114","C0116","C0103","C0209","W0622","R0801",]
12+
13+
# Allow unused variables when underscore-prefixed.
14+
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
15+
16+
[format]
17+
# Like Black, indent with spaces, rather than tabs.
18+
indent-style = "space"
19+
20+
# Like Black, respect magic trailing commas.
21+
skip-magic-trailing-comma = false

.gitignore

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,6 @@
1+
*.sublime-workspace
2+
*.code-workspace
3+
.vscode
14
__pycache__/
2-
5+
*.pyc
6+
*~

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
[![Checks](https://github.com/MetOffice/SimSys_Scripts/actions/workflows/lint.yml/badge.svg)](https://github.com/MetOffice/SimSys_Scripts/actions/workflows/lint.yml)
2+
13
# SimSys Scripts
24

35
This repository contains support scripts that are common across the many

script_umdp3_checker/bin/umdp3_check.pl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1133,12 +1133,12 @@ sub run_checks {
11331133
$filename .= ".";
11341134
}
11351135
$filename = $log_cylc . "." . $filename . "report";
1136-
my $fileres = open( FH, '>', $filename );
1136+
my $fileres = open( my $fh, '>', $filename );
11371137
if ( !defined $fileres ) {
11381138
die "ERR: $filename\n";
11391139
}
1140-
print FH $failure_text;
1141-
close(FH);
1140+
print $fh $failure_text;
1141+
close($fh);
11421142
}
11431143
}
11441144
$message = '';

0 commit comments

Comments
 (0)