diff --git a/.codacy/codacy.yaml b/.codacy/codacy.yaml index d75cea1..bbcd08d 100644 --- a/.codacy/codacy.yaml +++ b/.codacy/codacy.yaml @@ -1,10 +1,4 @@ runtimes: - node@22.2.0 - - python@3.11.11 - - dart@3.7.2 tools: - - eslint@9.3.0 - - trivy@0.59.1 - - pylint@3.3.6 - - pmd@6.55.0 - - dartanalyzer@3.7.2 + - eslint@9.3.0 \ No newline at end of file diff --git a/.github/workflows/codacy.yml b/.github/workflows/codacy.yml index 987e4cb..2f65bd4 100644 --- a/.github/workflows/codacy.yml +++ b/.github/workflows/codacy.yml @@ -20,17 +20,17 @@ jobs: with: node-version: '18' # Choose your Node.js version - - name: Run Codacy Analysis CLI with Docker (optional) - run: | - export CODACY_CODE=$GITHUB_WORKSPACE - docker run \ - --rm=true \ - --env CODACY_CODE="$CODACY_CODE" \ - --volume /var/run/docker.sock:/var/run/docker.sock \ - --volume "$CODACY_CODE":"$CODACY_CODE" \ - --volume /tmp:/tmp \ - codacy/codacy-analysis-cli \ - analyze --tool eslint --upload --project-token ${{ secrets.CODACY_PROJECT_TOKEN }} --max-allowed-issues 99999 --commit-uuid $GITHUB_SHA + - name: Run Codacy CLI + uses: codacy/codacy-cli-v2-action@main + env: + GH_TOKEN: ${{ secrets.GH_TOKEN}} + with: + api_token: ${{ secrets.CODACY_API_TOKEN }} + tool: eslint9 + upload_report: true + provider: gh + owner: codacy-acme + repository: sample-javascript-project - name: Install dependencies run: | diff --git a/eslint.config.mjs b/eslint.config.mjs new file mode 100644 index 0000000..b593178 --- /dev/null +++ b/eslint.config.mjs @@ -0,0 +1,6 @@ +export default [ + { + rules: { + } + } +]; \ No newline at end of file diff --git a/main.js b/main.js index 40c8aba..3d3087f 100644 --- a/main.js +++ b/main.js @@ -5,9 +5,17 @@ const { add, subtract } = require('./util'); // Function to add two numbers function addNumbers(a, b) { + console.log('Adding numbers:', a, b); return add(a, b); } + +// Function to multiply two numbers +function multiplyNumbers(a, b) { + console.log('Multiplying numbers:', a, b); + return a * b; +} + // Function to subtract two numbers function subtractNumbers(a, b) { return subtract(a, b);