Skip to content

Commit a4b309e

Browse files
committed
Update precious and mise config and tidy all files
1 parent 4197ed4 commit a4b309e

6 files changed

Lines changed: 50 additions & 44 deletions

File tree

dev-bin/install-xt-tools.sh

Lines changed: 0 additions & 19 deletions
This file was deleted.

lib/File/LibMagic.pm

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ use strict;
66
use warnings;
77

88
use Carp;
9-
use Exporter qw( import );
9+
use Exporter qw( import );
1010
use File::LibMagic::Constants qw ( constants );
11-
use List::Util qw( max );
12-
use Scalar::Util qw( reftype );
11+
use List::Util qw( max );
12+
use Scalar::Util qw( reftype );
1313
use XSLoader;
1414

1515
our $VERSION = '1.24';

mise.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[tools]
2+
node = "24.14.0"
3+
"npm:prettier" = "3.8.1"
4+
taplo = "0.10.0"
5+
"github:houseabsolute/omegasort" = "0.1.3"
6+
"github:houseabsolute/precious" = "0.10.2"

precious.toml

Lines changed: 39 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
exclude = [
2-
".build/**/*",
3-
"FileLibMagic-*/**/*",
4-
"blib/**/*",
2+
".build/**",
3+
"File-LibMagic-*",
4+
"META.yml",
5+
"MYMETA.yml",
6+
"blib/**",
57
"t/00-*",
68
"t/author-*",
79
"t/release-*",
@@ -12,51 +14,68 @@ exclude = [
1214
[commands.omegasort-gitignore]
1315
type = "both"
1416
include = "**/.gitignore"
15-
cmd = [ "omegasort", "--sort=path" ]
17+
cmd = ["omegasort", "--sort", "path", "--unique"]
1618
lint_flags = "--check"
1719
tidy_flags = "--in-place"
1820
ok_exit_codes = 0
1921
lint_failure_exit_codes = 1
20-
expect_stderr = true
2122

2223
[commands.omegasort-stopwords]
2324
type = "both"
2425
include = ".stopwords"
25-
cmd = [ "omegasort", "--sort=text", "--case-insensitive" ]
26+
cmd = ["omegasort", "--sort", "text", "--case-insensitive", "--unique"]
2627
lint_flags = "--check"
2728
tidy_flags = "--in-place"
2829
ok_exit_codes = 0
2930
lint_failure_exit_codes = 1
30-
expect_stderr = true
3131

3232
[commands.perlcritic]
3333
type = "lint"
34-
include = [ "**/*.{pl,pm,t,psgi}" ]
35-
cmd = [ "perlcritic", "--profile=$PRECIOUS_ROOT/perlcriticrc" ]
34+
include = ["**/*.{pl,pm,t,psgi}"]
35+
cmd = ["perlcritic", "--profile=$PRECIOUS_ROOT/perlcriticrc"]
3636
ok_exit_codes = 0
3737
lint_failure_exit_codes = 2
3838

3939
[commands.perltidy]
4040
type = "both"
41-
include = [ "**/*.{pl,pm,t,psgi}" ]
42-
cmd = [ "perltidy", "--profile=$PRECIOUS_ROOT/perltidyrc" ]
43-
lint_flags = [ "--assert-tidy", "--no-standard-output", "--outfile=/dev/null" ]
44-
tidy_flags = [ "--backup-and-modify-in-place", "--backup-file-extension=/" ]
41+
include = ["**/*.{pl,pm,t,psgi}"]
42+
cmd = ["perltidy", "--profile=$PRECIOUS_ROOT/perltidyrc"]
43+
lint_flags = ["--assert-tidy", "--no-standard-output", "--outfile=/dev/null"]
44+
tidy_flags = ["--backup-and-modify-in-place", "--backup-file-extension=/"]
4545
ok_exit_codes = 0
4646
lint_failure_exit_codes = 2
47-
expect_stderr = true
47+
ignore_stderr = "Begin Error Output Stream"
4848

4949
[commands.podchecker]
5050
type = "lint"
51-
include = [ "**/*.{pl,pm,pod}" ]
52-
cmd = [ "podchecker", "--warnings", "--warnings" ]
53-
ok_exit_codes = [ 0, 2 ]
51+
include = ["**/*.{pl,pm,pod}"]
52+
cmd = ["podchecker", "--warnings", "--warnings"]
53+
ok_exit_codes = [0, 2]
5454
lint_failure_exit_codes = 1
55-
expect_stderr = true
55+
ignore_stderr = [".+ pod syntax OK", ".+ does not contain any pod commands"]
5656

5757
[commands.podtidy]
5858
type = "tidy"
59-
include = [ "**/*.{pl,pm,pod}" ]
60-
cmd = [ "podtidy", "--columns", "80", "--inplace", "--nobackup" ]
59+
include = ["**/*.{pl,pm,pod}"]
60+
cmd = ["podtidy", "--columns", "80", "--inplace", "--nobackup"]
6161
ok_exit_codes = 0
6262
lint_failure_exit_codes = 1
63+
64+
[commands.prettier]
65+
type = "both"
66+
include = ["**/*.yml"]
67+
cmd = ["prettier", "--no-config", "--prose-wrap", "always", "--print-width", "100"]
68+
lint_flags = "--check"
69+
tidy_flags = "--write"
70+
ok_exit_codes = 0
71+
lint_failure_exit_codes = 1
72+
ignore_stderr = "Code style issues"
73+
74+
[commands.taplo]
75+
type = "both"
76+
include = "**/*.toml"
77+
cmd = ["taplo", "format", "--option", "indent_string= ", "--option", "column_width=100"]
78+
lint_flags = "--check"
79+
ok_exit_codes = 0
80+
lint_failure_exit_codes = 1
81+
ignore_stderr = "INFO taplo.+"

t/constructor-params.t

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use warnings;
44
use FindBin qw( $Bin );
55
use lib "$Bin/lib";
66

7-
use Cwd qw( abs_path );
7+
use Cwd qw( abs_path );
88
use File::Temp qw( tempdir );
99
use Test::AnyOf;
1010
use Test::More 0.96;

t/lib/Test/Exports.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ use Test::AnyOf;
77
use Test::Fatal;
88
use Test::More 0.96;
99

10-
use Exporter qw( import );
10+
use Exporter qw( import );
1111
use File::LibMagic::Constants qw( constants );
1212

1313
our @EXPORT_OK = qw( test_complete test_easy );

0 commit comments

Comments
 (0)