-
Notifications
You must be signed in to change notification settings - Fork 1
Reestruturação e melhorias. #33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
felipesqra
wants to merge
17
commits into
SPLAB-UFCG:master
Choose a base branch
from
felipesqra:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
6b403ab
padronizando nomes das regras
felipesqra 00ee5ae
mudando testIfIsFile para boolean
felipesqra 38984a6
Reestruturando diretorios de acordo com a extensao das regras, percor…
felipesqra c23278f
Update README.md
felipesqra c182334
corrigindo directory files
felipesqra 9cb4401
Merge branch 'master' of https://github.com/felipesqra/Moenda
felipesqra 4495a42
Documentando projeto
felipesqra db2024c
Update README.md
felipesqra 27bb5ac
Update README.md
felipesqra bafe344
Update README.md
felipesqra 33cb220
Update README.md
felipesqra 9c58c14
Iniciando contexto md, Documentando, criando testes jest
felipesqra 2dc4245
corrigindo bug
felipesqra 96aab30
corrigindo bug
felipesqra 8580c15
corrigindo bug
felipesqra 4599299
corrigindo bug
felipesqra 7f722ea
making changes that Fanny cited
felipesqra File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| #### Código de Conduta para Colaboradores | ||
| # Código de Conduta para Colaboradores | ||
|
|
||
| ## Nossa promessa | ||
|
|
||
|
|
||
This file contains hidden or 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
This file contains hidden or 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 |
|---|---|---|
| @@ -1,33 +1,50 @@ | ||
| #!/usr/bin/env node | ||
|
|
||
| const util = require('../src/util'); | ||
| const os = require('os'); | ||
| const {Command} = require('commander'); | ||
| const program = new Command(); | ||
| const genericRules = require("../src/rules/genericRules/genericRules"); | ||
| const mdContext = require("../src/context/MDContext/MDContext"); | ||
|
|
||
| program.version('0.0.1'); | ||
|
|
||
| //Building the CLI | ||
| program | ||
| .option('-r, --rules <type>', 'Rules file') | ||
| .option('-p, --path <type>', 'Archive for analysis') | ||
| .option('-e, --exclude <type>', 'Exclude Extensions') | ||
| .option('-c, --config <type>', 'Configurations'); | ||
| .option('-c, --config <type>', 'Configurations') | ||
| .option('-t, --context <type>', 'Contexts') | ||
|
|
||
| program.parse(process.argv); | ||
|
|
||
| /** | ||
| * Analyzes whether the informed path corresponds to a file or a directory, then calls the function that constructs the output. | ||
| */ | ||
| function main() { | ||
| if (util.testIfIsFile(program.path).status === true) { | ||
| util.exitAid(program); | ||
| if (util.testIfIsFile(program.path)) { | ||
| console.log(util.exitAid(program, genericRules)); | ||
|
|
||
| if (program.context === "true"){ | ||
| console.log(mdContext.contextGenerator(program.path)); | ||
| } | ||
| } else { | ||
| let parameter = ''; | ||
|
|
||
| if (program.exclude) { | ||
| parameter += program.exclude; | ||
| } | ||
|
|
||
| const array = util.directoryFiles(program.path, parameter).data; | ||
|
|
||
| /** | ||
| * Creates an array with the files in the directory informed by program.path, ignoring the extensions informed in program.exclude. | ||
| */ | ||
| const array = util.directoryFiles(program.path, parameter); | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why not? |
||
|
|
||
| for (let i = 0; i < array.length; i++) { | ||
| util.exitAid(program, array[i]); | ||
| console.log(util.exitAid(program, genericRules, array[i])); | ||
| if (program.context === "true"){ | ||
| if (mdContext.contextGenerator(array[i]) !== null) | ||
| console.log(mdContext.contextGenerator(array[i])); | ||
| } | ||
| } | ||
| } | ||
| } | ||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this right? it sounds more correct a boolean