Skip to main content

Um script em Python que fica observando uma pasta e rodando o norminette nos arquivos quando forem salvos

Project description

watch-norminette

Um script em Python que fica observando uma pasta e rodando o norminette nos arquivos quando forem salvos

Instalação

Clone o repositório com o seguinte comando:

git clone https://github.com/NiumXp/watch-norminette.git

..instale os comandos wn e watch-norminette utilizando

pip install ./watch-norminette
export PATH=/home/coder/.local/bin:$PATH

Trapaça

Esse script foi desenvolvido para rodar o norminette da 42 toda vez que um arquivo for salvo e mostrar no terminal, mas pode ser considerado trapaça utilizar o watch-norminette no basecamp já que

"Durante avaliações, o camper precisa ter total conhecimento do código e das ferramentas que usa."

Se você não souber como o código funciona, não utilize, caso esteja confuso em alguma parte, abra uma Issue e tire sua dúvida!

Exemplos

Você pode utilizar wn e/ou watch-norminette para utilizar o script.

Sem flags

Utilizando apenas watch-norminette o script irá observar o path atual e toda vez que um arquivo for salvo ele mostrará seus erros, se tiver.

coder@nximenes-workspace-6cc74fc6b8-xm6kf:~$ watch-norminette
/home/coder/watch/teste.c:17:9  Found space when expecting tab
/home/coder/watch/teste.c:20:1  Empty line in function
/home/coder/watch/teste.c:21:12 Return value must be in parenthesis

[!] https://github.com/NiumXp/watch-norminette

--errors

Utilizando a flag --errors, o script irá coletar todos os arquivos e mostrar a quantidade dos que possuem erros.

coder@nximenes-workspace-6cc74fc6b8-xm6kf:~$ watch-norminette --errors
  2 /home/coder/a.c
 22 /home/coder/b.c
  4 /home/coder/watch/teste.c

[!] https://github.com/NiumXp/watch-norminette

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

watch-norminette-0.0.3.tar.gz (15.6 kB view details)

Uploaded Source

Built Distribution

watch_norminette-0.0.3-py3-none-any.whl (15.7 kB view details)

Uploaded Python 3

File details

Details for the file watch-norminette-0.0.3.tar.gz.

File metadata

  • Download URL: watch-norminette-0.0.3.tar.gz
  • Upload date:
  • Size: 15.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.25.1 requests-toolbelt/0.9.1 urllib3/1.26.5 tqdm/4.63.1 importlib-metadata/4.0.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.7

File hashes

Hashes for watch-norminette-0.0.3.tar.gz
Algorithm Hash digest
SHA256 9bcf8628c2325c9393c137f25bdc57ed319b35d28f789a9132d6b8c3bd59ff2b
MD5 c610476045b2af6fa1b4729e2f967804
BLAKE2b-256 85da14347954635759507f90631a34a0690cda11147166fc36e944336f3926e8

See more details on using hashes here.

File details

Details for the file watch_norminette-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: watch_norminette-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 15.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.25.1 requests-toolbelt/0.9.1 urllib3/1.26.5 tqdm/4.63.1 importlib-metadata/4.0.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.7

File hashes

Hashes for watch_norminette-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 dbe4ade7db633553e405f5fbc790d0a354c69ef76e15711d88df9e157005fdd0
MD5 e5e520684f99a57e8fa8b813d05f8afd
BLAKE2b-256 2969626411d01c8b4b1addbaf86eac1a0382496bb28321e0e0871ce6ea2352c8

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page