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

Smaple 11 #447

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
b88d8a4
Create codacy.yml
bharatprakashparakh Nov 30, 2023
6565243
Update codacy.yml
bharatprakashparakh Dec 4, 2023
64704dc
Update Dockerfile
bharatprakashparakh Dec 4, 2023
cdddf64
Update .gitignore
bharatprakashparakh Dec 6, 2023
10ffca1
Update .gitignore
bharatprakashparakh Dec 7, 2023
f52ac78
Update .gitignore
bharatprakashparakh Dec 7, 2023
08e3e55
Update .gitignore
bharatprakashparakh Dec 7, 2023
c982b22
Update dependabot.yml
bharatprakashparakh Dec 11, 2023
d8620c3
Update dependabot.yml
bharatprakashparakh Dec 11, 2023
0a38acc
Update package.json
bharatprakashparakh May 8, 2024
fbdd8a1
Update README.md
bharatprakashparakh May 13, 2024
3543268
Update README.md
bharatprakashparakh May 13, 2024
d775499
Update README.md
bharatprakashparakh May 13, 2024
1e6239c
added files
bharatprakashparakh May 14, 2024
9ff9acc
Rename plugins.sbt to plugin.sbt
bharatprakashparakh May 21, 2024
e61443c
Update patterns.xml
bharatprakashparakh May 22, 2024
c119c0f
Create test2.css
bharatprakashparakh May 22, 2024
7b3a51b
Update plugin.sbt
bharatprakashparakh May 22, 2024
381fa6b
Update build.properties
bharatprakashparakh May 22, 2024
800f5eb
Create Hello.xml
bharatprakashparakh May 22, 2024
0f32364
Update package.json
bharatprakashparakh May 26, 2024
b9b45cf
Update package.json
bharatprakashparakh May 26, 2024
331a47d
renamed hello.xml 27-may
bharatprakashparakh May 26, 2024
d50afea
renamed hello.xml 27-may
bharatprakashparakh May 26, 2024
ca6089a
renamed hello.xml 27-may
bharatprakashparakh May 26, 2024
da4f063
renamed hello.xml 27-may
bharatprakashparakh May 26, 2024
25fae2b
renamed folder hello.xml 27-may
bharatprakashparakh May 27, 2024
7e92eaf
30 may 1
bharatprakashparakh May 30, 2024
ae45a27
30 may 2
bharatprakashparakh May 30, 2024
fd0e7ce
30 may 2
bharatprakashparakh May 30, 2024
a714a67
Merge pull request #7 from bharatprakashparakh/sample-2
bharatprakashparakh May 30, 2024
f1db520
30 may 1 sample-3
bharatprakashparakh May 30, 2024
90db194
30 may 2 sample-3
bharatprakashparakh May 30, 2024
6a3bcb4
Merge pull request #8 from bharatprakashparakh/sample-3
bharatprakashparakh May 30, 2024
501ee27
Sample 4 (#9)
bharatprakashparakh May 30, 2024
1a50f08
1st sample-5
bharatprakashparakh May 30, 2024
4938347
2nd sample-5
bharatprakashparakh May 30, 2024
15a1826
master 31 may 1st
bharatprakashparakh May 30, 2024
e0f6ea1
1st - sample 8
bharatprakashparakh May 30, 2024
5b1a39a
Merge pull request #11 from bharatprakashparakh/sample-8
bharatprakashparakh May 30, 2024
4604e50
1st - sample 9
bharatprakashparakh May 30, 2024
8941fb7
Merge pull request #12 from bharatprakashparakh/sample-9
bharatprakashparakh May 30, 2024
3e489d2
1st - sample 10
bharatprakashparakh May 31, 2024
389ef98
Merge pull request #13 from bharatprakashparakh/sample-10
bharatprakashparakh May 31, 2024
c719f19
1st - sample 11
bharatprakashparakh May 31, 2024
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
4 changes: 2 additions & 2 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ updates:
directory: "/"
schedule:
interval: daily
timezone: Europe/Lisbon
timezone: Europe/Lisbon
open-pull-requests-limit: 10
ignore:
- dependency-name: stylelint-config-standard
versions:
- 21.0.0
- dependency-name: stylelint-config-recommended
versions:
- 4.0.0
- 4.0.0
61 changes: 61 additions & 0 deletions .github/workflows/codacy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

# This workflow checks out code, performs a Codacy security scan
# and integrates the results with the
# GitHub Advanced Security code scanning feature. For more information on
# the Codacy security scan action usage and parameters, see
# https://github.com/codacy/codacy-analysis-cli-action.
# For more information on Codacy Analysis CLI in general, see
# https://github.com/codacy/codacy-analysis-cli.

name: Codacy Security Scan

on:
push:
branches: [ "master" ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ "master" ]
schedule:
- cron: '18 1 * * 3'

permissions:
contents: read

jobs:
codacy-security-scan:
permissions:
contents: read # for actions/checkout to fetch code
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
name: Codacy Security Scan
runs-on: ubuntu-latest
steps:
# Checkout the repository to the GitHub Actions runner
- name: Checkout code
uses: actions/checkout@v3

# Execute Codacy Analysis CLI and generate a SARIF output with the security issues identified during the analysis
- name: Run Codacy Analysis CLI
uses: codacy/codacy-analysis-cli-action@d840f886c4bd4edc059706d09c6a1586111c540b
with:
# Check https://github.com/codacy/codacy-analysis-cli#project-token to get your project token from your Codacy repository
# You can also omit the token and run the tools that support default configurations
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
verbose: true
output: results.sarif
format: sarif
# Adjust severity of non-security issues
gh-code-scanning-compat: true
# Force 0 exit code to allow SARIF file generation
# This will handover control about PR rejection to the GitHub side
max-allowed-issues: 2147483647

# Upload the SARIF file generated in the previous step
- name: Upload SARIF results file
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: results.sarif
8 changes: 4 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
/logs/
/project/*-shim.sbt
/project/project/
/project/target/
/project/target/
target
/.bsp
.idea
.metals
project/metals.sbt
project/metals.sbt
.bloop
.DS_Store
*.iml
node_modules/
node_modules/
.stylelint-version
.vscode/
.vscode/
8 changes: 4 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
FROM alpine:3.18

WORKDIR /workdir
COPY package*.json ./
RUN adduser -u 2004 -D docker &&\
apk --no-cache add openjdk11-jre-headless bash nodejs npm &&\
npm install --legacy-peer-deps --omit=dev &&\
apk del npm
COPY docs /docs
apk del npm \
COPY docs /docss
COPY target/universal/stage/ /workdir/
RUN chmod +x /workdir/bin/codacy-stylelint
USER docker
WORKDIR /src
WORKDIR /src/main
ENTRYPOINT ["/workdir/bin/codacy-stylelint"]
26 changes: 19 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,34 +10,45 @@ Docker engine to allow Codacy to have [stylelint](https://github.com/stylelint/s
## Usage

You can create the docker by following these steps:
Random content1
Random Content2
Random Content3

1) Generate base image:





1) Generate base image content1:
```
docker build -t codacy-stylelint-base .
```

2) Generate tool image:

```
sbt docker:publishLocal
```

The docker is ran with the following command:
The docker is ran with the following command: new changes are here.

```

docker run -it -v $srcDir:/src <DOCKER_NAME>:<DOCKER_VERSION>
```
2) Generate tool images:


## Docs


[Tool Developer Guide](https://support.codacy.com/hc/en-us/articles/207994725-Tool-Developer-Guide)

[Tool Developer Guide - Using Scala](https://support.codacy.com/hc/en-us/articles/207280379-Tool-Developer-Guide-Using-Scala)

## Test

We use the [codacy-plugins-test](https://github.com/codacy/codacy-plugins-test) to test our external tools integration.
You can follow the instructions there to make sure your tool is working as expected.

Hello, we use the [codacy-plugins-test](https://github.com/codacy/codacy-plugins-test) to test our external tools integration.
New content
## Update tool version

The tool is dependabot friendly, so it is automatically updated.
Expand All @@ -48,9 +59,10 @@ The tool is dependabot friendly, so it is automatically updated.
sbt "doc-generator/run"
```


## What is Codacy

[Codacy](https://www.codacy.com/) is an Automated Code Review Tool that monitors your technical debt, helps you improve your code quality, teaches best practices to your developers, and helps you save time in Code Reviews.
[Codacy](https://www.codacy.com/content) is an Automated Code Review Tool that monitors your technical debt, helps you improve your code quality, teaches best practices to your developers, and helps you save time in Code Reviews.

### Among Codacy’s features

Expand Down
4 changes: 2 additions & 2 deletions build.sbt → builds-new.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ ThisBuild / scalaVersion := "2.13.11"
ThisBuild / libraryDependencies += "com.codacy" %% "codacy-engine-scala-seed" % "6.1.0"
ThisBuild / libraryDependencies += "com.github.pathikrit" %% "better-files" % "3.9.2"

name := "codacy-stylelint"
name := "codacy-stylelint"s

lazy val `doc-generator` = project.settings(libraryDependencies += "com.vladsch.flexmark" % "flexmark-all" % "0.64.6")

enablePlugins(JavaAppPackaging)

s
Universal / javaOptions ++= Seq("-XX:+UseG1GC", "-XX:+UseStringDeduplication", "-XX:MaxRAMPercentage=90.0")
3 changes: 3 additions & 0 deletions doc-generator/sample/content.json.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"language": "python"
}
4 changes: 2 additions & 2 deletions docs/multiple-tests/pass-default-parameter/patterns.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8" ?>

<module name="root">
<module name="block-no-empty">
<!-- <module name="block-no-empty">
<!-- Not setting the parameter should give same result -->
<!-- <property name="block-no-empty" value="true" /> -->
</module>
</module> -->
</module>
4 changes: 4 additions & 0 deletions docs/multiple-tests/pass-default-parameter/src/test2.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.hEad {


}
8 changes: 5 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,15 @@
"test": "sbt scalafmtCheckAll scalafmtSbtCheck doc-generator/run stage"
},
"dependencies": {
"postcss": "^8.4.29",
"postcss-new": "^8.4.30",
"postcss-less": "^6.0.0",
"postcss-safe-parser": "^6.0.0",
"postcss-sass": "^0.5.0",
"postcss-scss": "^4.0.7",
"postcss-styled": "^0.34.0",
"postcss-styled-syntax": "^0.4.0",
"postcss-syntax": "^0.36.2",
"postcss-syntax": "^0.36.2",
"age": "19",
"prettier": "^3.0.3",
"stylelint": "^15.10.3",
"stylelint-config-css-modules": "^4.3.0",
Expand All @@ -28,6 +29,7 @@
"stylelint-prettier": "^4.0.2",
"stylelint-scss": "^5.1.0",
"stylelint-selector-bem-pattern": "^3.0.1",
"stylelint-suitcss": "^5.0.0"
"stylelint-suitcss": "^5.0.0",
"city": "delhi"
}
}
12 changes: 12 additions & 0 deletions project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1,13 @@
api.secretKey=superSecretKey123
db.encryptionKey=anotherSecretKey456

sbt.version=1.9.2
db.password=
api.timeout=5000


# Comments with excessive length, making them harder to read and maintain
# This is a very long comment that goes on and on without any real need for it to be this long,
# but it is here to demonstrate the kind of code smell that can occur when comments are not concise
# and to the point, making it harder for developers to quickly understand the context or purpose
# of the property or configuration being described.
7 changes: 7 additions & 0 deletions project/plugin.sbt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
resolvers += Resolver.jcenterRepo
addSbtPlugin("com.codacy" % "codacy-sbt-plugin" % "25.1.1")

//addSbtPlugin("com.github.sbt" % "sbt-native-packager" % "1.9.9")

// Coverage
//addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.9.2")
7 changes: 0 additions & 7 deletions project/plugins.sbt

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,6 @@ import codacy.stylelint.Stylelint
import com.codacy.tools.scala.seed.DockerEngine

object Engine extends DockerEngine(Stylelint)()
new chnages for sample-3

new content
9 changes: 9 additions & 0 deletions src/main/scala/codacy-new/Hellos-again-9.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8" ?>

<module name="root">


sss
</module>
</module>
new conten 5 8 9 10
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package codacy.stylelint
case class StylelintPatternResult(line: Int, column: Int, rule: String, severities: String, text: String)

case class StylelintPatternResult(line: Int, column: Int, rule: String, severity: String, text: String)

case class StylelintResult(source: String, warnings: List[StylelintPatternResult])
sss
case class StylelintResult(source: String, warnings: List[StylelintPatternResults])
Loading