-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: adicionando versão 1.0 ao projeto
- Loading branch information
1 parent
d11a0f9
commit 47ad64b
Showing
9 changed files
with
113 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
## Docker Composer do TOTVS Code Analisys OnPremise | ||
|
||
Este repositorio existe para automatizar a configuração do TOTVS Code Analisys em sua maquina local, leia os passos com cuidado, qualquer duvida só entrar em contato comigo pelo [E-mail](mailto:vitor@r2vkconsultoria.com.br) ou pelo [LinkedIn](https://www.linkedin.com/in/vitor-gabriell/). | ||
|
||
### Passos para intalação | ||
|
||
1. Baixe o [Docker](https://www.docker.com/). | ||
2. Faça a instalação do Docker e abra o programa. | ||
3. Clone este [projeto](https://github.com/vitor-gabriel/TOTVS-Code-Analisys-OnPremise.git) e abra ele com o VSCode. | ||
4. Rode o comando no terminal para fazer a instalação: | ||
``` | ||
docker compose up | ||
``` | ||
5. Coloque seus fontes na pasta */fontes* deste projeto. | ||
6. Coloque os includes na pasta */fontes/includes*. | ||
7. Execute novamente o quarto passo. | ||
8. Na pasta */fontes/output* estará o resultado da sua analise, sempre seguindo esta estrutura do json abaixo: | ||
``` | ||
{ | ||
"teste.prw":[ | ||
{ | ||
"severity":"ERROR", | ||
"line":"5", | ||
"rule":"CA2004-2", | ||
"message":"Regra: CA2004-2: Formato de leitura não permitido do Metadados - SX3. | Conteúdo: Direct Access not allowed in data dictionary. - Linha: 5" | ||
} | ||
] | ||
} | ||
``` | ||
|
||
## Detalhes dos codigos de erro | ||
|
||
Para obter mais informações sobre como corrigir erros no seu código-fonte, consulte este link: [Regras do SonarQube](https://sonar-rules.engpro.totvs.com.br/menu/rules). | ||
|
||
## Creditos e maiores detalhes | ||
|
||
Visite este link: [TOTVS Code Analisys](https://hub.docker.com/r/totvsengpro/advpl-tlpp-code-analyzer). | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
services: | ||
advpl-code-analyzer: | ||
image: totvsengpro/advpl-tlpp-code-analyzer:latest | ||
ports: | ||
- "8000:8000" | ||
volumes: | ||
- ./fontes:/tmp | ||
- ./fontes/includes:/tmp/includes | ||
- ./fontes/config:/bin/conf | ||
- ./fontes/output:/bin/output | ||
command: [ "/usr/bin/sonar-pipeline", "-v", "/tmp" ] |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"breakList": [], | ||
"breakOnError": true, | ||
"printSonarFullOutput": true, | ||
"printInternalWarnings": false | ||
} |
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
|
||
[SONARQUBE] [RUNALONE] [Ver: 1.7] Release Aug 2022 | ||
Executando runAlone | ||
|
||
|----------------------Parametros-----------------------------| | ||
--> Root path: /bin/src/ | ||
--> Includes path: /bin/includes/ | ||
--> Json?: true | ||
--> showPPOResult?: false | ||
--> Json path: /bin/output/output.json | ||
|-------------------------------------------------------------| | ||
|
||
Iniciando parsing... | ||
|
||
|
||
Iniciando Parsing.../bin/src/teste.prw | ||
runInDll: OK | ||
PPO try 1: | ||
|
||
{ | ||
"teste.prw": [ | ||
{ | ||
"severity": "ERROR", | ||
"line": "10", | ||
"rule": "CA2004-2", | ||
"message": "Regra: CA2004-2: Formato de leitura não permitido do Metadados - SX3. | Conteúdo: Direct Access not allowed in data dictionary. - Linha: 10" | ||
} | ||
] | ||
} | ||
Sucesso! | ||
1Fim! | ||
ADVPL Preprocessor: Precompilation of file /bin/src/teste.prw ok. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"teste.prw": [ | ||
{ | ||
"severity": "ERROR", | ||
"line": "10", | ||
"rule": "CA2004-2", | ||
"message": "Regra: CA2004-2: Formato de leitura não permitido do Metadados - SX3. | Conteúdo: Direct Access not allowed in data dictionary. - Linha: 10" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#INCLUDE "TOTVS.CH" | ||
|
||
User Function Teste() | ||
Local lFound as Character | ||
lFound := "C" | ||
|
||
DbSelectArea("SX3") | ||
DbGoTop() | ||
DbSetOrder(1) | ||
Dbseek(xFilial("SX3"+X3_CAMPO)) | ||
|
||
If lFound | ||
MsgInfo("Achou!") | ||
EndIf | ||
|
||
Return |