Skip to content

Commit

Permalink
chore: Update documentation files and fixing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
gabriel-logan committed Jul 13, 2024
1 parent 72b527d commit 5b9a0dd
Show file tree
Hide file tree
Showing 26 changed files with 416 additions and 121 deletions.
2 changes: 1 addition & 1 deletion .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
17 changes: 10 additions & 7 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 '....'
Expand All @@ -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.
20 changes: 10 additions & 10 deletions .github/workflows/java-pr-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
branches: [ main ]

pull_request:
branches: [ main ]
branches: [ main ]

workflow_dispatch:

Expand All @@ -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
30 changes: 15 additions & 15 deletions .github/workflows/maven-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ name: Maven Package

on:
release:
types: [created]
types: [ created ]

jobs:
build:
Expand All @@ -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 }}
Empty file.
Empty file.
Empty file.
8 changes: 7 additions & 1 deletion .idea/sonarlint/issuestore/index.pb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Empty file.
Empty file.
Empty file.
8 changes: 7 additions & 1 deletion .idea/sonarlint/securityhotspotstore/index.pb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

80 changes: 47 additions & 33 deletions .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ Violating these terms may lead to a permanent ban.
### 4. Permanent Ban

**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.

**Consequence**: A permanent ban from any sort of public interaction within
Expand Down
32 changes: 17 additions & 15 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,29 @@
# multiform-validator - Contribution Guide

The multiform-validator is a powerful Multilanguage library for validating form fields in multiple languages. This guide describes the guidelines for contributing to the project efficiently and effectively.
The multiform-validator is a powerful Multilanguage library for validating form fields in multiple languages. This guide
describes the guidelines for contributing to the project efficiently and effectively.

## How to Contribute

1. **Fork the Repository**
- Fork the multiform-validator repository to your GitHub account.
- Fork the multiform-validator repository to your GitHub account.

2. **Clone the Repository**
- Clone the forked repository to your local environment:
```
git clone https://github.com/gabriel-logan/multiform-validator.git
```
- Clone the forked repository to your local environment:
```
git clone https://github.com/gabriel-logan/multiform-validator.git
```

4. **Commit and Push**
- Commit your changes and push them to the forked repository:
```
git add .
git commit -m "Concise description of the changes"
git push origin my-feature
```
- Commit your changes and push them to the forked repository:
```
git add .
git commit -m "Concise description of the changes"
git push origin my-feature
```

5. **Open a Pull Request (PR)**
- Go to the forked repository on GitHub and open a PR to the main branch of the project.
- Go to the forked repository on GitHub and open a PR to the main branch of the project.

## Contribution Guidelines

Expand Down Expand Up @@ -65,4 +66,5 @@ ci: Configure CI pipeline to automatically test the controller

## License

By contributing to multiform-validator, you agree that your contributions will be licensed under the MIT license. Make sure you're familiar with the terms of this license.
By contributing to multiform-validator, you agree that your contributions will be licensed under the MIT license. Make
sure you're familiar with the terms of this license.
15 changes: 10 additions & 5 deletions SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,17 @@

If you find a vulnerability in the project, please follow these steps to report it:

1. **Report Submission**: Send a detailed email to [gabriellogan1717@gmail.com] with information about the vulnerability.
2. **Required Information**: Include in the report details such as a description of the vulnerability, steps to reproduce it, the potential impact, and any suggested fixes.
1. **Report Submission**: Send a detailed email to [gabriellogan1717@gmail.com] with information about the
vulnerability.
2. **Required Information**: Include in the report details such as a description of the vulnerability, steps to
reproduce it, the potential impact, and any suggested fixes.
3. **Initial Response**: You can expect an initial response within 72 hours of submitting the report.
4. **Review Process**: The vulnerability will be reviewed by our team. During this period, we may request additional information.
5. **Updates**: We will provide regular updates on the status of the review and the action plan to resolve the vulnerability.
6. **Disclosure**: If the vulnerability is confirmed, we will work on a fix and release a security update along with a vulnerability disclosure note.
4. **Review Process**: The vulnerability will be reviewed by our team. During this period, we may request additional
information.
5. **Updates**: We will provide regular updates on the status of the review and the action plan to resolve the
vulnerability.
6. **Disclosure**: If the vulnerability is confirmed, we will work on a fix and release a security update along with a
vulnerability disclosure note.

We appreciate your help in keeping the project safe and secure.

Expand Down
4 changes: 2 additions & 2 deletions docs/classes/CnpjValidator.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ public class Main {
System.out.println(cnpjIsTrue()); // true
System.out.println(cnpjIsFalse()); // false
}

public static boolean cnpjIsTrue() {
String cnpjTrue = "69.807.668/0001-41";
return CnpjValidator.cnpjIsValid(cnpjTrue);
}

public static boolean cnpjIsFalse() {
String cnpjFalse = "61.807.661/0001-48";
return CnpjValidator.cnpjIsValid(cnpjFalse);
Expand Down
10 changes: 5 additions & 5 deletions docs/classes/FileValidator.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ public class Main {
public static void main(String[] args) {
File file = new File("src/main/resources/audio.mp3");
System.out.println(isValidAudio(file)); // true | false

exampleExcludingExtensions();
}

public static void exampleExcludingExtensions() {
File file = new File("src/main/resources/audio.mp3");
String[] audioExtensions = {"mp3"};
Expand All @@ -55,17 +55,17 @@ public class Main {
public static void main(String[] args) {
File file = new File("src/main/resources/image.png");
System.out.println(isValidImage(file)); // true | false

exampleExcludingExtensions();
example2ExcludingExtensions();
}

public static void exampleExcludingExtensions() {
File file = new File("src/main/resources/image.png");
String[] imageExtensions = {"ico", "jpeg", "png"};
System.out.println(isValidImage(file, imageExtensions)); // false
}

public static void example2ExcludingExtensions() {
File file = new File("src/main/resources/image.png");
String[] imageExtensions = {"ico", "jpeg"};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ private static int calculateFirstVerifier(int[] cnpjBase) {
/**
* Calculate the second verifier digit of a CNPJ
*
* @param cnpjBase an array of integers with the first 12 digits of a CNPJ
* @param cnpjBase an array of integers with the first 12 digits of a CNPJ
* @param firstVerifier the first verifier digit
* @return the second verifier digit
*/
Expand Down
Loading

0 comments on commit 5b9a0dd

Please sign in to comment.