Skip to content

Commit

Permalink
Merge pull request #317 from ONLYOFFICE/feature/fix-linter
Browse files Browse the repository at this point in the history
Feature/fix linter
  • Loading branch information
LinneyS authored Dec 1, 2022
2 parents e9721dd + 808712a commit f7bb668
Show file tree
Hide file tree
Showing 8 changed files with 3,472 additions and 159 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/lint-python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,12 @@ jobs:
working-directory: ./web/documentserver-example/python
steps:
- uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: 3.6.9
python-version: '3.10'

- name: Install Dependencies
run: |
python -m pip install --upgrade pip
Expand All @@ -36,4 +37,4 @@ jobs:
- name: Lint Pylint
run: |
pylint ./**/*.py
pylint ./**/*.py
18 changes: 12 additions & 6 deletions .github/workflows/lint-ruby.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: RuboCop Linter
name: Rubocop

on:
workflow_dispatch:
Expand All @@ -18,8 +18,14 @@ jobs:
steps:
- name: Checkout Repository
uses: actions/checkout@v3

- name: RuboCop Linter Action
uses: andrewmcodes/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.0'
bundler-cache: true
- name: Install dependencies
run: |
bundle install
- name: Rubocop
run: |
gem install rubocop
rubocop
25 changes: 25 additions & 0 deletions web/documentserver-example/java-spring/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,31 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>2.17</version>
<executions>
<execution>
<id>validate</id>
<phase>validate</phase>
<configuration>
<configLocation>google_checks.xml</configLocation>
<encoding>UTF-8</encoding>
<failsOnError>true</failsOnError>
<failOnViolation>true</failOnViolation>
<logViolationsToConsole>true</logViolationsToConsole>
<violationSeverity>warning</violationSeverity>
<consoleOutput>true</consoleOutput>
<includeTestSourceDirectory>true
</includeTestSourceDirectory>
</configuration>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
25 changes: 25 additions & 0 deletions web/documentserver-example/java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,31 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>2.17</version>
<executions>
<execution>
<id>validate</id>
<phase>validate</phase>
<configuration>
<configLocation>google_checks.xml</configLocation>
<encoding>UTF-8</encoding>
<failsOnError>true</failsOnError>
<failOnViolation>true</failOnViolation>
<logViolationsToConsole>true</logViolationsToConsole>
<violationSeverity>warning</violationSeverity>
<consoleOutput>true</consoleOutput>
<includeTestSourceDirectory>true
</includeTestSourceDirectory>
</configuration>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>

Expand Down
1 change: 1 addition & 0 deletions web/documentserver-example/nodejs/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
public
15 changes: 15 additions & 0 deletions web/documentserver-example/nodejs/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
module.exports = {
env: {
browser: true,
commonjs: true,
es2021: true,
},
extends: ['airbnb-base'],
overrides: [
],
parserOptions: {
ecmaVersion: 'latest',
},
rules: {
},
};
Loading

0 comments on commit f7bb668

Please sign in to comment.