Skip to content

Commit e4dc704

Browse files
committed
ci(super-linter): switch to super-linter
1 parent bd4d0f4 commit e4dc704

File tree

6 files changed

+91
-73
lines changed

6 files changed

+91
-73
lines changed

.github/workflows/perlcritic.yml

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

.github/workflows/super-linter.yml

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
---
2+
#################################
3+
#################################
4+
## Super Linter GitHub Actions ##
5+
#################################
6+
#################################
7+
name: Lint Code Base
8+
9+
#
10+
# Documentation:
11+
# https://help.github.com/en/articles/workflow-syntax-for-github-actions
12+
#
13+
14+
#############################
15+
# Start the job on all push #
16+
#############################
17+
on:
18+
push:
19+
pull_request:
20+
schedule:
21+
- cron: "0 0 * * 0"
22+
workflow_dispatch:
23+
24+
permissions: {}
25+
26+
###############
27+
# Set the Job #
28+
###############
29+
jobs:
30+
lint:
31+
# Name the Job
32+
name: Lint Code Base
33+
# Set the agent to run on
34+
runs-on: ubuntu-latest
35+
36+
############################################
37+
# Grant status permission for MULTI_STATUS #
38+
############################################
39+
permissions:
40+
contents: read
41+
packages: read
42+
statuses: write
43+
44+
##################
45+
# Load all steps #
46+
##################
47+
steps:
48+
##########################
49+
# Checkout the code base #
50+
##########################
51+
- name: Checkout Code
52+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
53+
with:
54+
# Full git history is needed to get a proper list of changed
55+
# files within `super-linter`
56+
fetch-depth: 0
57+
persist-credentials: false
58+
59+
################################
60+
# Run Linter against code base #
61+
################################
62+
- name: Lint Code Base
63+
uses: super-linter/super-linter@ffde3b2b33b745cb612d787f669ef9442b1339a6 # v8.1.0
64+
env:
65+
VALIDATE_ALL_CODEBASE: true
66+
LINTER_RULES_PATH: .
67+
DEFAULT_BRANCH: main
68+
ENFORCE_COMMITLINT_CONFIGURATION_CHECK: true
69+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/yamllint.yml

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

JavaInfo

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ sub process_file {
4343
if (read(FILE, $buffer, 8)) {
4444
my @fields = unpack('NN', $buffer);
4545
if ($fields[0] == 0xCAFEBABE) {
46-
my $minor = ($fields[1] & 0xFF00) >> 16;
47-
my $major = $fields[1] & 0x00FF;
46+
my $minor = ($fields[1] & 0xFF00) >> 16; ## no critic [Use of bitwise operator]: indeed
47+
my $major = $fields[1] & 0x00FF; ## no critic [Use of bitwise operator]: indeed
4848
my $version = '';
4949
if ($major == 45) {
5050
if ($minor <= 3) {

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# JavaInfo
22

3-
Perl utility to extract the java version info from a class file's bytecode.
3+
Perl utility to extract the Java version info from a class file's bytecode.
44

55
[![PerlCritic](https://github.com/thomasleplus/JavaInfo/workflows/PerlCritic/badge.svg)](https://github.com/thomasleplus/JavaInfo/actions?query=workflow:"PerlCritic")

commitlint.config.js

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
const Configuration = {
2+
/*
3+
* Inherit rules from conventional commits.
4+
*/
5+
extends: ["@commitlint/config-conventional"],
6+
7+
/*
8+
* Any rules defined here will override rules from parent.
9+
*/
10+
rules: {
11+
"body-leading-blank": [2, "always"], // warning -> error
12+
"body-max-line-length": [1, "always", 100], // error -> warning
13+
"footer-leading-blank": [2, "always"], // warning -> error
14+
"footer-max-length": [1, "always", 100], // error -> warning
15+
"header-max-length": [1, "always", 100], // error -> warning
16+
},
17+
};
18+
19+
export default Configuration;

0 commit comments

Comments
 (0)