Commit 64e0eb47 authored by GridexX's avatar GridexX
Browse files

feat(codespell): add directory for analyze

parent 5c40a5cf
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
# Changelog
All notable changes to this job will be documented in this file.

## [0.2.0] - 2022-11-23
* Add `CODESPELL_DIRECTORY` variable

## [0.1.0] - 2022-09-22
* Initial version
 No newline at end of file
+2 −1
Original line number Diff line number Diff line
@@ -13,7 +13,8 @@ Fix common misspellings inside your code with [codespell](https://github.com/cod

| Name | Description | Default |
| ---- | ----------- | ------- |
| `CODESPELL_DICTIONARY` <img width=100/> | The dictionary file to ignore some words from the analyze. Check the behavior below 👇 <img width=175/> | `dictionary.txt` <img width=100/> |
| `CODESPELL_DIRECTORY` <img width=100/> | Path to the directory to be analyzed <img width=175/> | `.` <img width=100/> |
| `CODESPELL_DICTIONARY` | The dictionary file to ignore some words from the analyze. Check the behavior below 👇 | `dictionary.txt` |
| `CODESPELL_IGNORE_FILES` | Ignore files from the analyze. Separate each file with a space | ` ` |
| `CODESPELL_VERSION` | The version of codespell to install. Check out the [releases](https://github.com/codespell-project/codespell/releases) | `3.10-alpine3.16` |
| `IMAGE_TAG` | The default tag for the docker image | `3.10-alpine3.16` |
+8 −0
Original line number Diff line number Diff line
@@ -9,12 +9,20 @@ codespell:
    name: python:${IMAGE_TAG}
    entrypoint: [""]
  variables:
    CODESPELL_DIRECTORY: "."
    CODESPELL_DICTIONARY: "dictionary.txt"
    #separate each file to ignore with a space
    CODESPELL_IGNORE_FILES: ""
    CODESPELL_VERSION: "2.2.1"
    IMAGE_TAG: "3.10-alpine3.16"
  script:
    - | 
        if [ ! -d ${CODESPELL_DIRECTORY} ]; then
          echo "Directory specified ${CODESPELL_DIRECTORY} does not exist, exit"
          exit 1
        else
          cd ${CODESPELL_DIRECTORY}
        fi
    - pip install -q codespell===${CODESPELL_VERSION}
    - |
      IGNORE_FILES_OPTION=""