Skip to content

Commit

Permalink
Merge pull request #25 from TIBCOSoftware/feature/static-tools
Browse files Browse the repository at this point in the history
feat(cicd): introduction of static tools
  • Loading branch information
Gerromie authored Jan 10, 2022
2 parents 0199c48 + 8095148 commit a227e4f
Show file tree
Hide file tree
Showing 13 changed files with 5,659 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .commit-template
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@

# We use conventional commit style commit messages for automated changelog building.
# https://www.conventionalcommits.org/en/v1.0.0/
#
# Please use the following guidelines to format all your commit
# messages:
#
# <type>(<scope>): <subject>
# <BLANK LINE>
# <body>
# <BLANK LINE>
# <footer>
#
# Please note that:
# - The HEADER is a single line of max. 50 characters that
# contains a succinct description of the change. It contains a
# type, an optional scope, and a subject
# + <type> describes the kind of change that this commit is
# providing. Allowed types are:
# * feat (feature)
# * fix (bug fix)
# * docs (documentation)
# * style (formatting, missing semicolons, …)
# * refactor
# * test (when adding missing tests)
# * chore (maintain)
# + <scope> can be anything specifying the place of the commit
# change. Allowed types are:
# * cicd
# * infra
# * api
# * general
# + <subject> is a very short description of the change, in
# the following format:
# * imperative, present tense: “change” not
# “changed”/“changes”
# * no capitalized first letter
# * no dot (.) at the end
# - The BODY should include the motivation for the change and
# contrast this with previous behavior and must be phrased in
# imperative present tense
# - The FOOTER should contain any information about Breaking
# Changes and is also the place to reference GitHub issues that
# this commit closes
8 changes: 8 additions & 0 deletions .github/linters/.jscpd.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"reporters": ["html", "markdown" ],
"ignore": [
"**/.github/workflows/build.yaml",
"**/.github/workflows/deploy.yaml"
],
"threshold": 3
}
7 changes: 7 additions & 0 deletions .github/linters/.markdown-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
MD024:
# Allow changelog to reuse headings
siblings_only: true
MD013:
# Allow longer lines
line_length: 120
2 changes: 2 additions & 0 deletions .github/linters/.stylelintrc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
extends: stylelint-config-sass-guidelines

6 changes: 6 additions & 0 deletions .github/linters/.yaml-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
rules:
line-length:
max: 140
ignore: |
"**/.github/workflows/build.yaml"
12 changes: 12 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Story

Describe the story of the problem or new feature work.

## Changes

1. Enumerate changes
2. Enumerate changes

## Tests

Describe the tests that were performed.
43 changes: 43 additions & 0 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
---
name: Static Analysis

#
# Documentation:
# https://help.github.com/en/articles/workflow-syntax-for-github-actions

#############################
# Start the job on all push #
#############################
on: [push]

jobs:
static-analysis:
# Name the Job
name: Lint Code Base
# Set the agent to run on
runs-on: ubuntu-latest

steps:
- name: Checkout Code
uses: actions/checkout@v2
with:
# Full git history is needed to get a proper list of changed files within `super-linter`
fetch-depth: 0

- name: Lint Code Base
uses: github/super-linter@v4
env:
VALIDATE_ALL_CODEBASE: false
DEFAULT_BRANCH: main
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
FILTER_REGEX_EXCLUDE:
# FILTER_REGEX_INCLUDE: .*src/.*
# Prefer typescript
VALIDATE_JAVASCRIPT_ES: false
VALIDATE_JAVASCRIPT_STANDARD: false
# Seems to not match our linter ... prefer the ES version
VALIDATE_TYPESCRIPT_STANDARD: false
# Too many errors in the project
VALIDATE_HTML: false
VALIDATE_CLOUDFORMATION: false
CSS_FILE_NAME: .stylelintrc.yaml
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.target
.DS_Store
dist
node_modules

44 changes: 44 additions & 0 deletions .versionrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
"types": [
{
"type": "feat",
"section": "Features"
},
{
"type": "fix",
"section": "Bug Fixes"
},
{
"type": "chore",
"hidden": true
},
{
"type": "docs",
"hidden": true
},
{
"type": "style",
"hidden": true
},
{
"type": "refactor",
"hidden": true
},
{
"type": "perf",
"hidden": true
},
{
"type": "test",
"hidden": true
}
],
"commitUrlFormat": "https://github.com/TIBCOSoftware/labs-air-edgex/commits/{{hash}}",
"compareUrlFormat": "https://github.com/TIBCOSoftware/labs-air-edgex/compare/{{previousTag}}...{{currentTag}}",
"bumpFiles": [
{
"filename": "package.json",
"type": "json"
}
]
}
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ Project Air is an IoT platform for the registration of devices, process of IoT p

For more information please visit [Project Air](https://tibcosoftware.github.io/labs-air/) docs page.

![Static Analysis](https://github.com/TIBCOSoftware/labs-air-edgex/workflows/Static%20Analysis/badge.svg)

## Introduction

These components are device, services and other [edgex](https://www.edgexfoundry.org/) specific add-ons for project Air.
Expand Down
15 changes: 15 additions & 0 deletions commitlint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
module.exports = {
extends: ['@commitlint/config-conventional'],
rules: {
"scope-enum": [
2,
'always',
[
'cicd',
'infra',
'api',
'general'
]
]
}
};
Loading

0 comments on commit a227e4f

Please sign in to comment.