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

Unapproved verbs warning #2

Open
hartez opened this issue Jan 23, 2013 · 4 comments
Open

Unapproved verbs warning #2

hartez opened this issue Jan 23, 2013 · 4 comments

Comments

@hartez
Copy link
Owner

hartez commented Jan 23, 2013

When importing the module, PowerShell gives the following warning:

WARNING: The names of some imported commands from the module 'todo' include unapproved verbs that might make them less discoverable. To find the commands with unapproved verbs, run the Import-Module command again with the Verbose parameter. For a list of approved verbs, type Get-Verb.

@jeffa00
Copy link

jeffa00 commented Jan 23, 2013

Here are some thoughts:

Unapproved Verbs and Suggested Replacements-

Append-ToDo Edit-ToDo -append
Archive-ToDo Compress-ToDoList, Backup-ToDoList
Deprioritize-ToDo Edit-ToDo -deprioritize
Prepend-ToDo Edit-ToDo -prepend
Replace-ToDo Edit-ToDo -replace

"Approved" names can be aliased to traditional names.

Backup files into backups folder. I like structured directories: /backups/2013/01-Jan/23/ToDo-20130123-1122.txt. Backup-ToDoList would make even more sense then. You also never have to worry that you munched someone's todo file that synced itself throughout their world...

Other Suggestions
Make variables for todo file and done file closer to unique to avoid name collisions.

@ArtWDrahn
Copy link
Contributor

I found another fix for this is to call the -DisableNameChecking on import.

So Import-Module -DisableNameChecking todo no warning!

@vatioz
Copy link

vatioz commented Feb 29, 2016

Not sure whether -DisableNameChecking is a real fix of the issue. It just suppress the message. The reason for name checking is not to annoy anybody, but to keep powershell naming consistent across all modules and to maintain easy discoverability by powershell users.
I would suggest same or similar solution that @jeffa00 already suggested. Even if cmdlets are not perfect, aliases can be used to fine-tune the experience.

@NetTecture
Copy link

That is all nice and dandy, but it assumes that there is a complete sensible set of verbs to start with. Which also flies in the face of modular programming at times.

Example:

Append-ToDo Edit-ToDo -append

from further up. That is nice - except in some scenarios append is a VERY different workflow that may be maintained separately. I lack words for a lot of things that work around application and data management and i have a number of cases where no verb is atually a proper match.

Things like data integration (move from staging to data warehouse) are simply missing. Edit... -integrate is nice, excelt it is a lot of specialized code (better in a separate cmdlet) AND...
there is a whole terminology in the applciations I maintain - which I would have to break it to keep powershell consistency.

So, yes, in general, I agree.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants