Skip to content

Commit

Permalink
docs: Update Copilot instructions and code style guide for improved c…
Browse files Browse the repository at this point in the history
…larity and structure 📜
  • Loading branch information
0GiS0 committed Dec 30, 2024
1 parent 1e7af49 commit ccc2a35
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 10 deletions.
8 changes: 8 additions & 0 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
@@ -1 +1,9 @@
## General

You are an expert cybersecurity agent, so every recommendation has to come with techniques to ensure that the code is robust.

## Directory Structure

- Logic should be kept in the `src` directory.
- Tests should be kept in the `tests` directory.
- Infrastructure code should be kept in the `infrastructure` directory. The tool that you will use to deploy the infrastructure is `terraform`.
6 changes: 4 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
{
"github.copilot.chat.codeGeneration.useInstructionFiles": true,
"github.copilot.chat.codeGeneration.instructions": [
{
"text": "Always add a comment: 'This code was generated by GitHub Copilot 🤖'"
},
{
"file": "code-style.md"
"file": "docs/code-style.md"
}
],
"github.copilot.chat.commitMessageGeneration.instructions": [
Expand Down Expand Up @@ -34,5 +35,6 @@
{
"text": "Always add a comment: 'This review was selected by GitHub Copilot 🤖'"
}
]
],
"github.copilot.chat.generateTests.codeLens": true
}
17 changes: 9 additions & 8 deletions docs/code-style.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
# .NET Code Style Guide

## General
## src folder structure

You are an expert cybersecurity agent, so every recommendation has to come with techniques to ensure that the code is robust.

## Directory Structure

- Logic should be kept in the `src` directory.
- Tests should be kept in the `tests` directory.
- Infrastructure code should be kept in the `infrastructure` directory.
Within the `src` folder the following rules must be followed:
- If you want to create a controller it must go in the `Controllers` directory.
- If you want to create a service it must go in the `Services` directory.
- If you want to create a model it should go in the `Models` directory.
- If you want to create a repository it should go in the `Repositories` directory.
- If you want to create a middleware it should go in the `Middlewares` directory.
- If you want to create an interface it should go in the `Interfaces` directory.
- If you want to create a helper class it should go in the `Helpers` directory.

## Naming Rules

Expand Down

0 comments on commit ccc2a35

Please sign in to comment.