Skip to content

Commit

Permalink
chore: add linter (#187)
Browse files Browse the repository at this point in the history
* chore: add linter

* ci: fix github actions syntax

* chore: format

* chore: update goldens
  • Loading branch information
burkedavison authored Aug 18, 2023
1 parent a1194b6 commit 6dc0c12
Show file tree
Hide file tree
Showing 115 changed files with 5,611 additions and 5,847 deletions.
40 changes: 18 additions & 22 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,48 +1,44 @@
# This is a basic workflow to help you get started with Actions
name: ci

name: CI

# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches: [ main ]
pull_request:
branches: [ main ]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
defaults:
run:
working-directory: ./third_party/docfx-doclet-143274

jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
java-version: 11
distribution: temurin
- name: build project
working-directory: ./third_party/docfx-doclet-143274
run: mvn clean install -DskipTests
- run: mvn -B -ntp install -DskipTests

test:
# The type of runner that the job will run on
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
java-version: 11
distribution: temurin
- run: mvn -B -ntp test

# Steps represent a sequence of tasks that will be executed as part of the job
lint:
runs-on: ubuntu-latest
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
java-version: 11
distribution: temurin
- name: pass tests
working-directory: ./third_party/docfx-doclet-143274
run: mvn clean test
- run: mvn --version
- run: mvn -B -ntp fmt:check
9 changes: 7 additions & 2 deletions third_party/docfx-doclet-143274/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,18 @@ mvn package

This will produce two JAR files that you can use - one with dependencies, and another one without.

To run the linter:
```bash
mvn fmt:format
```

## Usage

### With `maven-javadoc-plugin`

When there is an existing java project where Maven is used as a build tool, one could add `maven-javadoc-plugin` to the root `pom.xml`:

```java
```xml
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
Expand Down Expand Up @@ -121,7 +126,7 @@ You can take a look at an [example documentation generation script](https://gith

## Development

When making changes, it is important to ensure that you are using `DocletRunner` class - it is responsible for makeing the `javadoc` call and takes params from an external configuration file.
When making changes, it is important to ensure that you are using `DocletRunner` class - it is responsible for making the `javadoc` call and takes params from an external configuration file.

To use it:

Expand Down
Loading

0 comments on commit 6dc0c12

Please sign in to comment.