Skip to content
This repository has been archived by the owner on Jul 12, 2022. It is now read-only.

warning when formulas commands conflicts #638

Merged

Conversation

victorschumacherzup
Copy link
Contributor

@victorschumacherzup victorschumacherzup commented Oct 27, 2020

Description

Sometimes we got confliting formulas commands on different repos, the idea of this pull request is to warn the user about this.

The user will be informed on two commands:
rit create formula
rit add repo

Example:
image

Changelog

Added warning on conflicting formulas

Signed-off-by: victor-schumacher <victorschumacher255@gmail.com>
@victorschumacherzup victorschumacherzup changed the title add reading and filtering warning when formulas commands conflicts Oct 27, 2020
@codecov-io
Copy link

codecov-io commented Oct 27, 2020

Codecov Report

Merging #638 into master will increase coverage by 0.17%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #638      +/-   ##
==========================================
+ Coverage   80.52%   80.69%   +0.17%     
==========================================
  Files         104      105       +1     
  Lines        3610     3642      +32     
==========================================
+ Hits         2907     2939      +32     
  Misses        506      506              
  Partials      197      197              
Impacted Files Coverage Δ
pkg/formula/formula.go 75.00% <ø> (ø)
pkg/formula/tree/default_tree.go 97.01% <ø> (ø)
pkg/cmd/add_repo.go 60.71% <100.00%> (+0.71%) ⬆️
pkg/cmd/create_formula.go 55.26% <100.00%> (+0.59%) ⬆️
pkg/commands/builder.go 89.32% <100.00%> (+0.06%) ⬆️
pkg/formula/input/prompt/prompt.go 97.08% <100.00%> (ø)
pkg/formula/tree/checker.go 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a3dee5e...165f5d2. Read the comment docs.

Signed-off-by: victor-schumacher <victorschumacher255@gmail.com>
Signed-off-by: victor-schumacher <victorschumacher255@gmail.com>
@victorschumacherzup victorschumacherzup force-pushed the feature/warnOnConflictingCmds branch from 6341418 to db13c90 Compare October 29, 2020 19:47
Signed-off-by: victor-schumacher <victorschumacher255@gmail.com>
@victorschumacherzup victorschumacherzup force-pushed the feature/warnOnConflictingCmds branch from db13c90 to 4f5b39d Compare October 29, 2020 19:48
Signed-off-by: victor-schumacher <victorschumacher255@gmail.com>
Signed-off-by: victor-schumacher <victorschumacher255@gmail.com>
Signed-off-by: victor-schumacher <victorschumacher255@gmail.com>
Signed-off-by: victor-schumacher <victorschumacher255@gmail.com>
Signed-off-by: victor-schumacher <victorschumacher255@gmail.com>
Signed-off-by: victor-schumacher <victorschumacher255@gmail.com>
Signed-off-by: victor-schumacher <victorschumacher255@gmail.com>
Signed-off-by: victor-schumacher <victorschumacher255@gmail.com>
Signed-off-by: victor-schumacher <victorschumacher255@gmail.com>
Signed-off-by: victor-schumacher <victorschumacher255@gmail.com>
Signed-off-by: victor-schumacher <victorschumacher255@gmail.com>
metrics.json Outdated Show resolved Hide resolved
Signed-off-by: victor-schumacher <victorschumacher255@gmail.com>
Signed-off-by: victor-schumacher <victorschumacher255@gmail.com>
Copy link
Contributor

@henriquemoraeszup henriquemoraeszup left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Im good to go 🚀

Signed-off-by: victor-schumacher <victorschumacher255@gmail.com>
brunasilvazup
brunasilvazup previously approved these changes Nov 6, 2020
pkg/cmd/add_repo.go Outdated Show resolved Hide resolved
pkg/cmd/create_formula.go Outdated Show resolved Hide resolved
pkg/formula/tree/checker.go Outdated Show resolved Hide resolved
pkg/formula/tree/checker.go Outdated Show resolved Hide resolved
@victorschumacherzup
Copy link
Contributor Author

/merge qa

@ritchie-bot
Copy link
Contributor

ritchie-bot bot commented Nov 6, 2020

👌 Merged branch feature/warnOnConflictingCmds into qa

Signed-off-by: victor-schumacher <victorschumacher255@gmail.com>
@victorschumacherzup
Copy link
Contributor Author

/merge qa

@ritchie-bot
Copy link
Contributor

ritchie-bot bot commented Nov 6, 2020

👌 Merged branch feature/warnOnConflictingCmds into qa

Signed-off-by: victor-schumacher <victorschumacher255@gmail.com>
@victorschumacherzup
Copy link
Contributor Author

/merge qa

@ritchie-bot
Copy link
Contributor

ritchie-bot bot commented Nov 9, 2020

👌 Merged branch feature/warnOnConflictingCmds into qa

Signed-off-by: victor-schumacher <victorschumacher255@gmail.com>
@kaduartur
Copy link
Contributor

/merge qa

@ritchie-bot
Copy link
Contributor

ritchie-bot bot commented Nov 9, 2020

👌 Merged branch feature/warnOnConflictingCmds into qa

@kaduartur kaduartur merged commit 7998361 into ZupIT:master Nov 9, 2020
brunonmelo pushed a commit to brunonmelo/ritchie-cli that referenced this pull request Nov 12, 2020
* add reading and filtering

* adding

Signed-off-by: victor-schumacher <victorschumacher255@gmail.com>

* finding and printing conflicts

Signed-off-by: victor-schumacher <victorschumacher255@gmail.com>

* add basic test

Signed-off-by: victor-schumacher <victorschumacher255@gmail.com>

* fix lint

Signed-off-by: victor-schumacher <victorschumacher255@gmail.com>

* remove spaces

Signed-off-by: victor-schumacher <victorschumacher255@gmail.com>

* fix main

Signed-off-by: victor-schumacher <victorschumacher255@gmail.com>

* little refactor

Signed-off-by: victor-schumacher <victorschumacher255@gmail.com>

* little refactor

Signed-off-by: victor-schumacher <victorschumacher255@gmail.com>

* added a better test

Signed-off-by: victor-schumacher <victorschumacher255@gmail.com>

* added a repeated command

Signed-off-by: victor-schumacher <victorschumacher255@gmail.com>

* added dir

Signed-off-by: victor-schumacher <victorschumacher255@gmail.com>

* add check for no conflicting commands

Signed-off-by: victor-schumacher <victorschumacher255@gmail.com>

* added tree check to add repo

Signed-off-by: victor-schumacher <victorschumacher255@gmail.com>

* fix empty warning

Signed-off-by: victor-schumacher <victorschumacher255@gmail.com>

* fixing tests

Signed-off-by: victor-schumacher <victorschumacher255@gmail.com>

* Apply suggestions from code review

Co-authored-by: henriquemoraeszup <68074718+henriquemoraeszup@users.noreply.github.com>

* using treeManager now

Signed-off-by: victor-schumacher <victorschumacher255@gmail.com>

* removed miss code

Signed-off-by: victor-schumacher <victorschumacher255@gmail.com>

* addde total commands

Signed-off-by: victor-schumacher <victorschumacher255@gmail.com>

* remove changes

Signed-off-by: victor-schumacher <victorschumacher255@gmail.com>

* remove comments

Signed-off-by: victor-schumacher <victorschumacher255@gmail.com>

* added a check for output

Signed-off-by: victor-schumacher <victorschumacher255@gmail.com>

* syntax and formula check

Signed-off-by: victor-schumacher <victorschumacher255@gmail.com>

* fix tests

Signed-off-by: victor-schumacher <victorschumacher255@gmail.com>

* remove println

Signed-off-by: victor-schumacher <victorschumacher255@gmail.com>

Co-authored-by: victor-schumacher <victorschumacher255@gmail.com>
Co-authored-by: henriquemoraeszup <68074718+henriquemoraeszup@users.noreply.github.com>
Signed-off-by: Bruno N. Melo <brunonobrega.melo@gmail.com>
brunonmelo pushed a commit to brunonmelo/ritchie-cli that referenced this pull request Nov 12, 2020
* add reading and filtering

* adding

Signed-off-by: victor-schumacher <victorschumacher255@gmail.com>

* finding and printing conflicts

Signed-off-by: victor-schumacher <victorschumacher255@gmail.com>

* add basic test

Signed-off-by: victor-schumacher <victorschumacher255@gmail.com>

* fix lint

Signed-off-by: victor-schumacher <victorschumacher255@gmail.com>

* remove spaces

Signed-off-by: victor-schumacher <victorschumacher255@gmail.com>

* fix main

Signed-off-by: victor-schumacher <victorschumacher255@gmail.com>

* little refactor

Signed-off-by: victor-schumacher <victorschumacher255@gmail.com>

* little refactor

Signed-off-by: victor-schumacher <victorschumacher255@gmail.com>

* added a better test

Signed-off-by: victor-schumacher <victorschumacher255@gmail.com>

* added a repeated command

Signed-off-by: victor-schumacher <victorschumacher255@gmail.com>

* added dir

Signed-off-by: victor-schumacher <victorschumacher255@gmail.com>

* add check for no conflicting commands

Signed-off-by: victor-schumacher <victorschumacher255@gmail.com>

* added tree check to add repo

Signed-off-by: victor-schumacher <victorschumacher255@gmail.com>

* fix empty warning

Signed-off-by: victor-schumacher <victorschumacher255@gmail.com>

* fixing tests

Signed-off-by: victor-schumacher <victorschumacher255@gmail.com>

* Apply suggestions from code review

Co-authored-by: henriquemoraeszup <68074718+henriquemoraeszup@users.noreply.github.com>

* using treeManager now

Signed-off-by: victor-schumacher <victorschumacher255@gmail.com>

* removed miss code

Signed-off-by: victor-schumacher <victorschumacher255@gmail.com>

* addde total commands

Signed-off-by: victor-schumacher <victorschumacher255@gmail.com>

* remove changes

Signed-off-by: victor-schumacher <victorschumacher255@gmail.com>

* remove comments

Signed-off-by: victor-schumacher <victorschumacher255@gmail.com>

* added a check for output

Signed-off-by: victor-schumacher <victorschumacher255@gmail.com>

* syntax and formula check

Signed-off-by: victor-schumacher <victorschumacher255@gmail.com>

* fix tests

Signed-off-by: victor-schumacher <victorschumacher255@gmail.com>

* remove println

Signed-off-by: victor-schumacher <victorschumacher255@gmail.com>

Co-authored-by: victor-schumacher <victorschumacher255@gmail.com>
Co-authored-by: henriquemoraeszup <68074718+henriquemoraeszup@users.noreply.github.com>
Signed-off-by: Bruno N. Melo <brunonobrega.melo@gmail.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
🔨 improvement Improvement in features ✔️ ready-for-review ready for review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants