User:Lemondoge/Gnomehub

Gnomehub

This page contains several searchlinks that can be used by WikiGnomes (such as myself) to locate pages that could use some 'gnomeification — whether they have minor typos, failure to comply with MOS, etc. — along with some regex expressions that might help locate or fix errors while you're already in a page. In addition, it also contains other utilities, such as useful edit summaries or links to guidelines.

Typo searches
Some typos that are relatively common, or that appear surprisingly often.

e.t.c.
etc. is not an acronym

innacurate
Should be "inaccurate"

Formatting mistakes
Errors with formatting, especially those that fail to comply with the MOS.

"Artificial" hatnote
"See also", "Main article", or "Further information" hatnotes made without using the proper templates (e.g.  rather than ). (NOTE: This search is very expensive.)

Modules that can be simplified
These searchlinks are for detecting modules with portions that could be simplified. All of these search in the module namespace.

NOTE: The regex here may give false positives; it might match an area that actually cannot be simplified any further.

can usually be simplified to.

Can generally be simplified to.

This detects overly verbose return statements.

Can use  instead.

Can generally be simplified to. Note: This searchlink is rather inaccurate, and likely needs improvement.

{{Search link|1=insource:/not( +{{!}} *\[!-\<>-\}]+ *[~=]=/|label={{Clickable button|1=insource:/not( +{{!}} *\[!-\<>-\}]+ *[~=]=/}}|ns=ns828}}

Is just equivalent to, since length is a natural number.

Same as above.

Is just equivalent to, since length is a natural number.

nested not
Catches stuff like. Regex is ; too big to fit in button

{{Search link|1=insource:/not[^!-~]*\(([^!-~]*(not[^!-~]+)?[!-~]+[^!-~]+and[^!-~]+not[^!-~]+[!-\<>-\}]+[^!-~]*|[^!-~]*not[^!-~]+?[!-~]+[^!-~]+and[^!-~]+(not[^!-~]+)?[!-\<>-\}]+[^!-~]*)\)/|label=|ns=ns828}}

If a module contains, it is an error!   is always y, so   will ALWAYS yield y.

nested if
Detects modules with unnecessarily nested if statements; however, will not give you the location in the search results. Note: HIGHLY inaccurate

Invalid escape sequence
Attempts to use backslashes to escape certain characters in strings, especially patterns. Usually, this is because % should have been used instead of a backslash. (See the lua reference for valid escape sequences, except that \[ and \] don't actually work.)

Note: This will successfully avoid matching even numbers of backslashes (it won't match something like ). However, as a compromise due to the lack of support for lookbehinds, the regex will also harmlessly consume one character behind the first backslash.

Overly verbose "tonumber" statements. Slightly inaccurate, but can be refined.

and similar
Just use %D.

Regexes
A few regular expressions that might be helpful for finding errors via search and replace:

Edit summaries
Useful edit summaries to provide justification for gnome actions.

Wikipedia policy resources
Some Wikipedia policies that you can cite in your edit summaries
 * MOS:SIC: says to silently correct insignificant spelling and typographic errors in quotations.
 * MOS:OL: things that shouldn't be linked
 * MOS:PF: references should usually go after punctuation instead of before