Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Warn when using deprecated rgrep#2657

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
benblank wants to merge1 commit intokoalaman:master
base:master
Choose a base branch
Loading
frombenblank:rgrep

Conversation

@benblank
Copy link

Just asegrep andfgrep have been deprecated by both the POSIX and GNU versions of grep, Debian has deprecated thergrep command it injects into the GNU grep package they distribute. (Which Ubuntu inherits, as well.)

The patches applied by Debian nowlist all three as deprecated (though all three are also listed as "Debian-specific", so perhapsegrep andfgrep have already been removed upstream?), even though it alsoremoves the deprecation warning fromegrep andfgrep (rgrep never had one).

This PR adds a new rule, SC2324, which is identical toSC2196 andSC2197 save that it targetsrgrep. As a bonus,rgrep has also been added to the list of greps for which-q should be suggested (SC2143).

It probably also makes sense to add all three variants toSC2126 (piping grep towc -l whengrep -c could be used instead), but I didn't discover that until I was typing up this description and my (fairly limited) Haskell skills aren't up to doing it quickly. 😅 If others agree that it should be done though, I'll happily make the change when I have more time in the next few days.

Copy link

@port19xport19x left a comment

Choose a reason for hiding this comment

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

Looks good.

Suggessting-c foregrep,fgrep,rgrep orzgrep would be a bad idea.
Assuming shellcheck compliance, those instances of.{1}grep | wc -l will already be changed to standardgrep -c due to the SC2324 you extend here.

@benblank
Copy link
Author

already be changed

I'll have to take your word for it — I'm still working my way though figuring out the code structure. 😉

@port19x
Copy link

It's a two step process. see below:

2023-01-16_07-14

benblank reacted with thumbs up emoji

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

1 more reviewer

@port19xport19xport19x approved these changes

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@benblank@port19x

[8]ページ先頭

©2009-2025 Movatter.jp