Skip to content

Commit 0da2379

Browse files
committed
wip
1 parent d7b1b28 commit 0da2379

File tree

1 file changed

+14
-18
lines changed

1 file changed

+14
-18
lines changed

.github/CONTRIBUTING.md

Lines changed: 14 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -23,22 +23,18 @@ git clone [email protected]:YOURNAMESPACE/megalinter.git
2323

2424
### 4. Test your changes
2525

26-
#### 4.1 Gitpod
26+
#### 4.1 Visual Studio Code Dev Containers
2727

28-
Use Gitpod for a cloud-based development environment:
28+
The Visual Studio Code Dev Containers extension lets you use a container as a full-featured development environment:
2929

30-
1. Sign up for Gitpod: <https://gitpod.io>
31-
2. Fork the `megalinter` repository
32-
3. Open your fork in Gitpod: `https://gitpod.io/#https://github.com/username/megalinter`
33-
4. Create a new branch: `git checkout -b my-feature-branch`
34-
5. Make your changes and commit: `git add .` and `git commit -m "chore: description of changes"`
35-
6. Test all : `make tests` or `make tests-fast` for TDD mode
36-
7. Test with megalinter: `make megalinter-tests`
37-
8. Push your changes: `git push origin my-feature-branch`
38-
9. Create a pull request on GitHub
39-
10. Wait for a review
40-
41-
Keep your Gitpod workspace synced with the main repository.
30+
1. Fork the `megalinter` repository
31+
2. [Open your fork](https://docs.github.com/en/codespaces/developing-in-a-codespace/rebuilding-the-container-in-a-codespace#rebuilding-a-container) in VS Code
32+
3. Create a new branch: `git checkout -b my-feature-branch`
33+
4. Make your changes and commit: `git add .` and `git commit -m "chore: description of changes"`
34+
5. [Run tests](https://code.visualstudio.com/docs/editor/testing#_automatic-test-discovery-in-testing-view)
35+
6. Push your changes: `git push origin my-feature-branch`
36+
7. Create a pull request on GitHub
37+
8. Wait for a review
4238

4339
#### 4.2 Desktop
4440

@@ -168,7 +164,7 @@ If you are creating a linter or making changes to a linter, you may want to run
168164

169165
When running them, you may encounter several problems:
170166

171-
* it's not installed on the machine locally and you don't want to install it.
167+
* It's not installed on the machine locally and you don't want to install it.
172168
* The OS doesn't allow the installation of the linter because it's not cross-platform.
173169
* The behavior between running it on the local machine (host) and the container is different.
174170

@@ -178,9 +174,9 @@ For those cases, it's important to have the possibility to run the tests inside
178174
2. Execute the following commands in a ***.sh** script. Example:
179175

180176
```bash
181-
docker buildx build -f linters/spell_misspell/Dockerfile . --tag spell_misspell
182-
TEST_KEYWORDS_TO_USE="spell_misspell"
183-
docker run -e TEST_CASE_RUN=true -e OUTPUT_DETAIL=detailed -e TEST_KEYWORDS="${TEST_KEYWORDS_TO_USE}" -e MEGALINTER_VOLUME_ROOT="." -v "/var/run/docker.sock:/var/run/docker.sock:rw" -v $(pwd):/tmp/lint spell_misspell
177+
LINTER="spell_misspell"
178+
docker buildx build -f linters/$LINTER/Dockerfile . --tag $LINTER
179+
docker run -e TEST_CASE_RUN=true -e OUTPUT_DETAIL=detailed -e TEST_KEYWORDS="${LINTER}" -e MEGALINTER_VOLUME_ROOT="." -v "/var/run/docker.sock:/var/run/docker.sock:rw" -v $(pwd):/tmp/lint $LINTER
184180
```
185181

186182
In the above example, it builds the **misspell** linter image and then runs its tests. To do the same for another linter you would have to:

0 commit comments

Comments
 (0)