Skip to content
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

Resolve ignored Shellcheck issues #181

Open
IGPenguin opened this issue Mar 25, 2020 · 0 comments
Open

Resolve ignored Shellcheck issues #181

IGPenguin opened this issue Mar 25, 2020 · 0 comments
Labels
enhancement existing functionality extension help wanted unknown solution or major effort inevitable

Comments

@IGPenguin
Copy link
Owner

IGPenguin commented Mar 25, 2020

🐞 Whats wrong

The following warnings are currently ignored in new pull requests:

  • SC2001 - replace sed with ${variable//search/replace}
  • SC1090 - non-constant source
  • SC2207 - no arrays like this ($())
Using xargs -I
Given the -I option, xargs will perform an action for each line of text that we feed into it. We can give the line a variable name to use in commands that xargs can execute.
$ adb devices | tail -n +2 | cut -sf -1 | xargs -I X echo X aw yiss
ZY2222NP55 aw yiss
192.168.56.101:5555 aw yiss
We can see here that we have told xargs to take each line of text (each identifier), and refer to it as X. Then execute the echo command with the identifier and the string “ aw yiss”. And xargs happily obliges.

🌈 Desired state

All Shellcheck issues are resolved and none are ignored.

📏 Challenges

I dont have deep shell skills 😅

📂 Sources

google.com

@IGPenguin IGPenguin added this to 💀 Colossal Challenges in Mobile Toolkit 1.0.0 Mar 25, 2020
@IGPenguin IGPenguin moved this from 💀 Colossal Challenges to 📜 Backlog in Mobile Toolkit 1.0.0 Mar 25, 2020
@IGPenguin IGPenguin added enhancement existing functionality extension help wanted unknown solution or major effort inevitable labels Mar 25, 2020
@IGPenguin IGPenguin added this to 📜 Backlog in Mobile Toolkit 1.?.? Apr 4, 2020
@IGPenguin IGPenguin moved this from 📜 Backlog to 🧹 Housekeeping in Mobile Toolkit 1.?.? Apr 4, 2020
@IGPenguin IGPenguin changed the title Resolve ignored Shellcheck isssues Resolve ignored Shellcheck issues Sep 11, 2020
@IGPenguin IGPenguin moved this from 🧹 Housekeeping to 💀 Colossal Challenges in Mobile Toolkit 1.?.? Aug 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement existing functionality extension help wanted unknown solution or major effort inevitable
Projects
Mobile Toolkit 1.?.?
💀 Colossal Challenges
Development

No branches or pull requests

1 participant