Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-Introduction of Problem Matchers #43

Merged
merged 10 commits into from
Apr 20, 2021
20 changes: 20 additions & 0 deletions .github/cfn-lint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"problemMatcher": [
{
"owner": "cfn-lint",
"pattern": [
{
"regexp": "^([EWI](\\d{4}))\\s(.+)$",
"code": 1,
"message": 3
},
{
"regexp": "^(\\S+):(\\d+):(\\d+)$",
"file": 1,
"line": 2,
"column": 3
}
]
}
]
}
3 changes: 2 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ on:
push:
branches:
- main
- ft/2.0.0
- feature/**
- bug/**
pull_request:
jobs:
unit:
Expand Down
1 change: 1 addition & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
. "$(dirname "$0")/_/husky.sh"

npx lint-staged
npm run all
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,17 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [2.1.0](https://github.com/ScottBrenner/cfn-lint-action/releases/tag/v2.1.0)

### Added

- Cloud Formation Linter [Problem Matchers](https://github.com/actions/toolkit/blob/main/docs/problem-matchers.md).
NickLiffen marked this conversation as resolved.
Show resolved Hide resolved
- Pre-Commit Hook for running `npm run all` to ensure the software is automatically re-built on changes.

### Changed

- Metadata cleanup within `package.json` to better align with software.

## [2.0.0](https://github.com/ScottBrenner/cfn-lint-action/releases/tag/v2.0.0)

### Added
Expand Down
4 changes: 2 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: "Setup AWS CFN LINT"
description: "Setup AWS CFN LINT and add it to the PATH"
name: "cfn-lint-action"
description: "Setup Amazon Cloud Formation Linter (cfn-lint)"
NickLiffen marked this conversation as resolved.
Show resolved Hide resolved
branding:
icon: "terminal"
color: "orange"
Expand Down
3 changes: 3 additions & 0 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,15 @@ module.exports =
/***/ ((__unused_webpack_module, __unused_webpack_exports, __nccwpck_require__) => {

const core = __nccwpck_require__(186);
const path = __nccwpck_require__(622);

const setup = __nccwpck_require__(391);

(async () => {
try {
await setup();
const matchersPath = path.join(__dirname, "..", ".github");
core.info(`##[add-matcher]${path.join(matchersPath, "cfn-lint.json")}`);
NickLiffen marked this conversation as resolved.
Show resolved Hide resolved
} catch (error) {
core.setFailed(error.message);
}
Expand Down
3 changes: 3 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
const core = require("@actions/core");
const path = require("path");

const setup = require("./lib/setup");

(async () => {
try {
await setup();
const matchersPath = path.join(__dirname, "..", ".github");
core.info(`##[add-matcher]${path.join(matchersPath, "cfn-lint.json")}`);
} catch (error) {
core.setFailed(error.message);
}
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "setup-cfn-lint",
"version": "0.1.0",
"name": "cfn-lint-action",
"version": "2.1.0",
"private": true,
"description": "Action to setup CloudFormation to the the PATH",
"main": "index.js",
Expand All @@ -11,7 +11,7 @@
"all": "npm run format && npm test && npm run build",
"prepare": "husky install"
},
"license": "Apache-2.0",
"license": "MIT License",
"dependencies": {
"@actions/core": "^1.2.6",
"@actions/exec": "^1.0.4",
Expand Down