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

Fix path names in workflows #6

Merged
merged 8 commits into from
May 13, 2024
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions .commitlintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"formatter": "@commitlint/format",
"rules": {
"scope-enum": [2, "always", [
"ci",
"framework",
"tools"
]],
"type-enum": [2, "always", [
"bug",
"feature",
"refactor"
]],
"signed-off-by": [0, "never"],
"trailer-exists": [0, "never"],
"references-empty": [2, "never"]
},
"helpUrl": "https://idrinth-api-ben.ch/contributing/",
"parserPreset": {
"parserOpts": {
"referenceActions": [ "closes", "fixes", "resolves", "refs" ]
}
}
}
110 changes: 110 additions & 0 deletions .dictionary.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
2xx
APIs
Autowiring
Benchmarking
Björn
Büttner
CLI
Codacy
Destructuring
DockerHub
Dockerfiles
ENV
Fastify
vue
Gitea
Gitlab
HAR
Idrinth's
airtimeux.com
JSON
Javascript
Jira
LinkedIn
MSSQL
Matomo
Microservice
Middleware
Middlewares
Mindmap
NPMJS
Node.js
OpenApi
OpenSauced
PascalCase
Postgres
README
Reddit
Roadmap
SHA
Web-UI
XML
XRAY_CLIENT_ID
XRAY_CLIENT_SECRET
XRAY_ENDPOINT
XRAY_PASSWORD
XRAY_TEST_PLAN_KEY
XRAY_USER_NAME
XRay
aBc
api-bench
api-bench-cli
api-bench-gitea-action
api-bench-gitlab-runner
api-bench-history-microservice
api-bench-history-website
api-bench-runner
api-benchmark
autowire
autowired
benchmarking
bugfixes
bvanderlaan
camelCase
ci-images
coai
codecheck
csrf-header
data.yml
deprecations
dockerfiles
eslint
faq
gitea
gitlab
gitlab-runner
history-microservice
iab
idrinth
idrinth-api-bench
jeffbski
json
jungwild
macOS
markmap
matteofigus
microservice
microservices
middleware
middlewares
mindmap
mono-repo
npm
ns
package.json
pino
pre
programmatically
readme
rest-APIs
sexualised
src
subprojects
tracking.bjoern-buettner.me
marikadeveloper marked this conversation as resolved.
Show resolved Hide resolved
ui
UI
[email protected]
winston
www.contributor-covenant.org
www.youtube-nocookie.com
xml
175 changes: 175 additions & 0 deletions .eslintrc.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,178 @@
env:
node: true
es6: true
extends:
- eslint:recommended
- "plugin:json/recommended"
- "plugin:@typescript-eslint/recommended"
plugins:
- json
ignorePatterns:
- node_modules
root: true
parser: "@typescript-eslint/parser"
rules:
no-await-in-loop: error
no-extra-parens: warn
no-template-curly-in-string: error
class-methods-use-this: error
complexity:
- error
- 5
Comment on lines +19 to +21
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tip

Codebase Verification

The complexity rule set to 5 has been frequently overridden in the project's TypeScript and JavaScript files. This indicates that the current threshold may be too restrictive for the project's complexity needs. CodeRabbit recommends reviewing the complexity threshold to better align with the project's requirements.

  • Files with complexity rule overrides:
    • tools/fta.js
    • src/storage/storage-factory.ts
    • src/routes/function-analyzer.ts
    • src/reporter/xray-onpremise-reporter.ts
    • src/reporter/xray-cloud-reporter.ts
    • src/main.ts
    • src/cli/loader.ts
    • src/cli/cli.ts
    • src/cli/check-routes.ts (multiple instances)
    • integration/prepare-temp-dir.ts
Analysis chain

The complexity rule is set to error out on a complexity of 5. This is a strict setting that helps maintain code simplicity and readability by limiting cyclomatic complexity. Consider if this threshold is appropriate for the project's complexity needs.

Scripts Executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Check for any overrides or comments regarding the complexity rule in the project's documentation or code comments.

# Search for mentions of 'complexity' in TypeScript and JavaScript files to understand context.
rg --type ts --type js 'complexity'

Length of output: 867

consistent-return: warn
curly: error
dot-notation: warn
eqeqeq: error
guard-for-in: error
no-alert: error
no-caller: error
no-eval: error
no-extend-native: error
no-extra-bind: warn
no-extra-label: warn
no-invalid-this: error
no-magic-numbers: warn
no-multi-spaces: warn
no-new-wrappers: error
no-new: error
no-console: warn
no-proto: error
no-return-await: error
no-self-compare: error
no-sequences: error
no-throw-literal: error
no-unused-expressions: warn
no-useless-call: warn
no-useless-return: warn
radix: error
require-await: error
require-unicode-regexp: error
wrap-iife:
- error
- inside
no-shadow: error
no-label-var: error
no-undef-init: error
no-undefined: error
no-use-before-define: error
func-call-spacing:
- warn
- never
func-names:
- error
- never
func-style:
- warn
- expression
function-call-argument-newline:
- error
- consistent
implicit-arrow-linebreak:
- warn
- beside
indent:
- warn
- 2
- SwitchCase: 1
key-spacing: warn
keyword-spacing: warn
lines-between-class-members:
- warn
- always
max-depth: warn
max-len:
- warn
- code: 80
ignorePattern: eslint
max-params: warn
newline-per-chained-call: warn
new-parens: error
no-array-constructor: error
no-continue: error
no-lonely-if: error
no-multi-assign: error
no-multiple-empty-lines:
- warn
- max: 1
no-nested-ternary: error
no-new-object: error
no-tabs: warn
no-trailing-spaces: warn
no-unneeded-ternary: error
no-whitespace-before-property: warn
object-curly-newline:
- warn
- multiline: true
minProperties: 1
object-curly-spacing:
- warn
- always
object-property-newline: warn
one-var-declaration-per-line:
- error
- always
quotes:
- warn
- single
semi: error
semi-spacing: warn
semi-style:
- error
- last
space-unary-ops:
- warn
- words: true
nonwords: true
space-before-function-paren:
- warn
- never
space-before-blocks:
- warn
- always
switch-colon-spacing:
- warn
- after: true
before: false
template-tag-spacing:
- warn
- always
eol-last:
- warn
- always
computed-property-spacing:
- warn
- never
comma-style:
- warn
- last
comma-spacing: warn
comma-dangle:
- warn
- always
block-spacing:
- warn
- always
array-element-newline: warn
brace-style: warn
array-bracket-spacing:
- warn
- never
- singleValue: true
array-bracket-newline:
- warn
- minItems: 2
prefer-rest-params: warn
template-curly-spacing:
- warn
- always
prefer-const: error
no-var: error
no-useless-constructor: warn
no-useless-computed-key: warn
no-confusing-arrow: warn
arrow-spacing: warn
arrow-body-style:
- warn
- as-needed
parserOptions:
ecmaVersion: 2018
48 changes: 48 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: CodeQL
on:
push:
branches:
- the-one
paths:
- '**.ts'
- '**.js'
- '**.cjs'
- 'package-lock.json'
- '.github/workflows/codeql.yml'
pull_request:
branches:
- the-one
paths:
- '**.ts'
- '**.js'
- '**.cjs'
- 'package-lock.json'
- '.github/workflows/codeql.yml'
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
timeout-minutes: 360
permissions:
security-events: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: javascript-typescript
queries: security-and-quality
- name: Setup Node.js environment ${{ env.CURRENT_NODE_VERSION }}
uses: actions/setup-node@v4
with:
node-version: latest
cache: 'npm'
cache-dependency-path: |
package-lock.json
- run: npm ci
- run: npm run language
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:javascript-typescript"
22 changes: 22 additions & 0 deletions .github/workflows/commit-message.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Commit Message Lint
on:
push:
branches:
- the-one
pull_request:
branches:
- the-one
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: latest
cache: 'npm'
cache-dependency-path: |
package-lock.json
- run: npm ci
- run: npm run commitlint-ci
Loading
Loading