From 5b9a0ddf396341ae891d9e7ea8cdda8d3e497051 Mon Sep 17 00:00:00 2001 From: gabriel-logan Date: Sat, 13 Jul 2024 17:12:59 -0300 Subject: [PATCH] chore: Update documentation files and fixing tests --- .github/FUNDING.yml | 2 +- .github/ISSUE_TEMPLATE/bug_report.md | 17 +- .github/workflows/java-pr-check.yml | 20 +- .github/workflows/maven-publish.yml | 30 +-- .../0834ae016f8fea5cff771880c0be1d55299732ff | 0 .../3f454a98e586d1aa0d322e19afd5e67e08f2d3c8 | 0 .../7c875fef54268bc433a7fc46aa5fd6e96d58f32f | 0 .idea/sonarlint/issuestore/index.pb | 8 +- .../0834ae016f8fea5cff771880c0be1d55299732ff | 0 .../3f454a98e586d1aa0d322e19afd5e67e08f2d3c8 | 0 .../7c875fef54268bc433a7fc46aa5fd6e96d58f32f | 0 .idea/sonarlint/securityhotspotstore/index.pb | 8 +- .idea/workspace.xml | 80 ++++---- CODE_OF_CONDUCT.md | 2 +- CONTRIBUTING.md | 32 ++-- SECURITY.md | 15 +- docs/classes/CnpjValidator.md | 4 +- docs/classes/FileValidator.md | 10 +- .../multiform_validator/CnpjValidator.java | 2 +- .../io/github/multiform_validator/Main.java | 14 +- .../io/github/multiform_validator/Utils.java | 3 +- .../github/multiform_validator/Validate.java | 7 +- .../github/multiform_validator/Validator.java | 73 +++++++- src/test/java/UtilsTest.java | 2 +- src/test/java/ValidatorTest.java | 177 +++++++++++++++++- .../java/assets/isValidImage/valid/valid.svg | 31 ++- 26 files changed, 416 insertions(+), 121 deletions(-) create mode 100644 .idea/sonarlint/issuestore/0/8/0834ae016f8fea5cff771880c0be1d55299732ff create mode 100644 .idea/sonarlint/issuestore/3/f/3f454a98e586d1aa0d322e19afd5e67e08f2d3c8 create mode 100644 .idea/sonarlint/issuestore/7/c/7c875fef54268bc433a7fc46aa5fd6e96d58f32f create mode 100644 .idea/sonarlint/securityhotspotstore/0/8/0834ae016f8fea5cff771880c0be1d55299732ff create mode 100644 .idea/sonarlint/securityhotspotstore/3/f/3f454a98e586d1aa0d322e19afd5e67e08f2d3c8 create mode 100644 .idea/sonarlint/securityhotspotstore/7/c/7c875fef54268bc433a7fc46aa5fd6e96d58f32f diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml index 10e4064..000b8f4 100644 --- a/.github/FUNDING.yml +++ b/.github/FUNDING.yml @@ -1,6 +1,6 @@ # These are supported funding model platforms -github: [gabriel-logan] # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] +github: [ gabriel-logan ] # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] patreon: # Replace with a single Patreon username open_collective: # Replace with a single Open Collective username ko_fi: # Replace with a single Ko-fi username diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index dd84ea7..3205926 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -12,6 +12,7 @@ A clear and concise description of what the bug is. **To Reproduce** Steps to reproduce the behavior: + 1. Go to '...' 2. Click on '....' 3. Scroll down to '....' @@ -24,15 +25,17 @@ A clear and concise description of what you expected to happen. If applicable, add screenshots to help explain your problem. **Desktop (please complete the following information):** - - OS: [e.g. iOS] - - Browser [e.g. chrome, safari] - - Version [e.g. 22] + +- OS: [e.g. iOS] +- Browser [e.g. chrome, safari] +- Version [e.g. 22] **Smartphone (please complete the following information):** - - Device: [e.g. iPhone6] - - OS: [e.g. iOS8.1] - - Browser [e.g. stock browser, safari] - - Version [e.g. 22] + +- Device: [e.g. iPhone6] +- OS: [e.g. iOS8.1] +- Browser [e.g. stock browser, safari] +- Version [e.g. 22] **Additional context** Add any other context about the problem here. diff --git a/.github/workflows/java-pr-check.yml b/.github/workflows/java-pr-check.yml index ec4332e..c946417 100644 --- a/.github/workflows/java-pr-check.yml +++ b/.github/workflows/java-pr-check.yml @@ -5,7 +5,7 @@ on: branches: [ main ] pull_request: - branches: [ main ] + branches: [ main ] workflow_dispatch: @@ -14,13 +14,13 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v4 - - name: Set up JDK 8 - uses: actions/setup-java@v4 - with: - java-version: '8' - distribution: 'temurin' - cache: maven - - name: Build with Maven - run: mvn -B package --file pom.xml + - name: Set up JDK 8 + uses: actions/setup-java@v4 + with: + java-version: '8' + distribution: 'temurin' + cache: maven + - name: Build with Maven + run: mvn -B package --file pom.xml diff --git a/.github/workflows/maven-publish.yml b/.github/workflows/maven-publish.yml index ff4c37b..8509866 100644 --- a/.github/workflows/maven-publish.yml +++ b/.github/workflows/maven-publish.yml @@ -5,7 +5,7 @@ name: Maven Package on: release: - types: [created] + types: [ created ] jobs: build: @@ -16,19 +16,19 @@ jobs: packages: write steps: - - uses: actions/checkout@v4 - - name: Set up JDK 8 - uses: actions/setup-java@v3 - with: - java-version: '8' - distribution: 'temurin' - server-id: github # Value of the distributionManagement/repository/id field of the pom.xml - settings-path: ${{ github.workspace }} # location for the settings.xml file + - uses: actions/checkout@v4 + - name: Set up JDK 8 + uses: actions/setup-java@v3 + with: + java-version: '8' + distribution: 'temurin' + server-id: github # Value of the distributionManagement/repository/id field of the pom.xml + settings-path: ${{ github.workspace }} # location for the settings.xml file - - name: Build with Maven - run: mvn -B package --file pom.xml + - name: Build with Maven + run: mvn -B package --file pom.xml - - name: Publish to GitHub Packages Apache Maven - run: mvn deploy -s $GITHUB_WORKSPACE/settings.xml - env: - GITHUB_TOKEN: ${{ github.token }} + - name: Publish to GitHub Packages Apache Maven + run: mvn deploy -s $GITHUB_WORKSPACE/settings.xml + env: + GITHUB_TOKEN: ${{ github.token }} diff --git a/.idea/sonarlint/issuestore/0/8/0834ae016f8fea5cff771880c0be1d55299732ff b/.idea/sonarlint/issuestore/0/8/0834ae016f8fea5cff771880c0be1d55299732ff new file mode 100644 index 0000000..e69de29 diff --git a/.idea/sonarlint/issuestore/3/f/3f454a98e586d1aa0d322e19afd5e67e08f2d3c8 b/.idea/sonarlint/issuestore/3/f/3f454a98e586d1aa0d322e19afd5e67e08f2d3c8 new file mode 100644 index 0000000..e69de29 diff --git a/.idea/sonarlint/issuestore/7/c/7c875fef54268bc433a7fc46aa5fd6e96d58f32f b/.idea/sonarlint/issuestore/7/c/7c875fef54268bc433a7fc46aa5fd6e96d58f32f new file mode 100644 index 0000000..e69de29 diff --git a/.idea/sonarlint/issuestore/index.pb b/.idea/sonarlint/issuestore/index.pb index ba3bfc6..e2df3ea 100644 --- a/.idea/sonarlint/issuestore/index.pb +++ b/.idea/sonarlint/issuestore/index.pb @@ -56,4 +56,10 @@ E H docs/classes/Validate.md,f\1\f1a6ae1a81b2873e9d16979d220bb8e583eeed3c I -docs/classes/Validator.md,e\3\e39d43ca39384f3ae643880ba15c91da9db36261 \ No newline at end of file +docs/classes/Validator.md,e\3\e39d43ca39384f3ae643880ba15c91da9db36261 +? +CONTRIBUTING.md,3\f\3f454a98e586d1aa0d322e19afd5e67e08f2d3c8 +B +CODE_OF_CONDUCT.md,0\8\0834ae016f8fea5cff771880c0be1d55299732ff +; + SECURITY.md,7\c\7c875fef54268bc433a7fc46aa5fd6e96d58f32f \ No newline at end of file diff --git a/.idea/sonarlint/securityhotspotstore/0/8/0834ae016f8fea5cff771880c0be1d55299732ff b/.idea/sonarlint/securityhotspotstore/0/8/0834ae016f8fea5cff771880c0be1d55299732ff new file mode 100644 index 0000000..e69de29 diff --git a/.idea/sonarlint/securityhotspotstore/3/f/3f454a98e586d1aa0d322e19afd5e67e08f2d3c8 b/.idea/sonarlint/securityhotspotstore/3/f/3f454a98e586d1aa0d322e19afd5e67e08f2d3c8 new file mode 100644 index 0000000..e69de29 diff --git a/.idea/sonarlint/securityhotspotstore/7/c/7c875fef54268bc433a7fc46aa5fd6e96d58f32f b/.idea/sonarlint/securityhotspotstore/7/c/7c875fef54268bc433a7fc46aa5fd6e96d58f32f new file mode 100644 index 0000000..e69de29 diff --git a/.idea/sonarlint/securityhotspotstore/index.pb b/.idea/sonarlint/securityhotspotstore/index.pb index ba3bfc6..e2df3ea 100644 --- a/.idea/sonarlint/securityhotspotstore/index.pb +++ b/.idea/sonarlint/securityhotspotstore/index.pb @@ -56,4 +56,10 @@ E H docs/classes/Validate.md,f\1\f1a6ae1a81b2873e9d16979d220bb8e583eeed3c I -docs/classes/Validator.md,e\3\e39d43ca39384f3ae643880ba15c91da9db36261 \ No newline at end of file +docs/classes/Validator.md,e\3\e39d43ca39384f3ae643880ba15c91da9db36261 +? +CONTRIBUTING.md,3\f\3f454a98e586d1aa0d322e19afd5e67e08f2d3c8 +B +CODE_OF_CONDUCT.md,0\8\0834ae016f8fea5cff771880c0be1d55299732ff +; + SECURITY.md,7\c\7c875fef54268bc433a7fc46aa5fd6e96d58f32f \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 0503b9b..ba72f42 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -5,11 +5,24 @@ + + + + - + + + - + + + + + + + + - { - "keyToString": { - "Application.Main.executor": "Run", - "Application.io.github.gabriel_logan.multiform_validator.Main.executor": "Run", - "Application.io.github.multiform_validator.Main.executor": "Run", - "JUnit.AsciiTest.executor": "Run", - "JUnit.CnpjValidatorTest.executor": "Run", - "JUnit.CpfValidatorTest.executor": "Run", - "JUnit.CpfValidatorTest.testNullCpf.executor": "Run", - "JUnit.CreditCardValidatorTest.executor": "Run", - "JUnit.CreditCardValidatorTest.testIdentifyFlagCard.executor": "Debug", - "JUnit.EmailValidatorTest.executor": "Run", - "JUnit.FileValidatorTest.executor": "Run", - "JUnit.MainTest.executor": "Run", - "JUnit.SimpleMathTest.executor": "Run", - "JUnit.UtilsTest.executor": "Run", - "JUnit.ValidateTest.executor": "Run", - "JUnit.ValidatorTest.executor": "Run", - "Maven.multiform-validator [test].executor": "Run", - "RunOnceActivity.OpenProjectViewOnStart": "true", - "RunOnceActivity.ShowReadmeOnStart": "true", - "SHARE_PROJECT_CONFIGURATION_FILES": "true", - "git-widget-placeholder": "main", - "kotlin-language-version-configured": "true", - "project.structure.last.edited": "Project", - "project.structure.proportion": "0.15", - "project.structure.side.proportion": "0.2", - "run.code.analysis.last.selected.profile": "pProject Default", - "settings.editor.selected.configurable": "preferences.pluginManager" + - +}]]> +