zsh-users
 help / color / mirror / code / Atom feed
* Announcing zsh-scan, a zsh-linter
@ 2023-01-28  9:19 Sebastian Gniazdowski
  2023-01-28 20:26 ` Sebastian Gniazdowski
  0 siblings, 1 reply; 4+ messages in thread
From: Sebastian Gniazdowski @ 2023-01-28  9:19 UTC (permalink / raw)
  To: Zsh Users

[-- Attachment #1: Type: text/plain, Size: 793 bytes --]

Hi,
a zsh linter with 7 checks currently:

https://github.com/psprint/zsh-scan

The checks are:
- whether emulate -L -o … or setopt has been used,
- whether fun-name() { preamble exists within an autoload function (it's
good practice to help Ctags recognizing the function),
- whether certain, useful options has been given, like localoptions,
typesetsilent, extendedglob, etc.
- whether -F option has been given to zparseopts (toggles error detection),
- whether -U option has been given to autoload,
- whether 0=… assignment exists,
- and whether 0= has a standard form,
- also, if variable being array is appended without (…), ie. arr+=elem
instead  of arr+=(elem)

Does someone have any idea of some new checks to add?

-- 
Best regards,
Sebastian Gniazdowski

[-- Attachment #2: Type: text/html, Size: 2351 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Announcing zsh-scan, a zsh-linter
  2023-01-28  9:19 Announcing zsh-scan, a zsh-linter Sebastian Gniazdowski
@ 2023-01-28 20:26 ` Sebastian Gniazdowski
  2023-01-31  7:37   ` Sebastian Gniazdowski
  0 siblings, 1 reply; 4+ messages in thread
From: Sebastian Gniazdowski @ 2023-01-28 20:26 UTC (permalink / raw)
  To: Zsh Users

[-- Attachment #1: Type: text/plain, Size: 994 bytes --]

Added warncreateglobal like checking but statically

sob., 28 sty 2023, 10:19 użytkownik Sebastian Gniazdowski <
sgniazdowski@gmail.com> napisał:

> Hi,
> a zsh linter with 7 checks currently:
>
> https://github.com/psprint/zsh-scan
>
> The checks are:
> - whether emulate -L -o … or setopt has been used,
> - whether fun-name() { preamble exists within an autoload function (it's
> good practice to help Ctags recognizing the function),
> - whether certain, useful options has been given, like localoptions,
> typesetsilent, extendedglob, etc.
> - whether -F option has been given to zparseopts (toggles error detection),
> - whether -U option has been given to autoload,
> - whether 0=… assignment exists,
> - and whether 0= has a standard form,
> - also, if variable being array is appended without (…), ie. arr+=elem
> instead  of arr+=(elem)
>
> Does someone have any idea of some new checks to add?
>
> --
> Best regards,
> Sebastian Gniazdowski
>
>

[-- Attachment #2: Type: text/html, Size: 2782 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Announcing zsh-scan, a zsh-linter
  2023-01-28 20:26 ` Sebastian Gniazdowski
@ 2023-01-31  7:37   ` Sebastian Gniazdowski
  2023-01-31 14:09     ` Ray Andrews
  0 siblings, 1 reply; 4+ messages in thread
From: Sebastian Gniazdowski @ 2023-01-31  7:37 UTC (permalink / raw)
  To: Zsh Users

[-- Attachment #1: Type: text/plain, Size: 1313 bytes --]

Also added: reporting on exact missing setopt options – till now it was
showing all recommended options, now it filters out the already given.

On Sat, 28 Jan 2023 at 20:26, Sebastian Gniazdowski <sgniazdowski@gmail.com>
wrote:

> Added warncreateglobal like checking but statically
>
> sob., 28 sty 2023, 10:19 użytkownik Sebastian Gniazdowski <
> sgniazdowski@gmail.com> napisał:
>
>> Hi,
>> a zsh linter with 7 checks currently:
>>
>> https://github.com/psprint/zsh-scan
>>
>> The checks are:
>> - whether emulate -L -o … or setopt has been used,
>> - whether fun-name() { preamble exists within an autoload function (it's
>> good practice to help Ctags recognizing the function),
>> - whether certain, useful options has been given, like localoptions,
>> typesetsilent, extendedglob, etc.
>> - whether -F option has been given to zparseopts (toggles error
>> detection),
>> - whether -U option has been given to autoload,
>> - whether 0=… assignment exists,
>> - and whether 0= has a standard form,
>> - also, if variable being array is appended without (…), ie. arr+=elem
>> instead  of arr+=(elem)
>>
>> Does someone have any idea of some new checks to add?
>>
>> --
>> Best regards,
>> Sebastian Gniazdowski
>>
>>

-- 
Best regards,
Sebastian Gniazdowski

[-- Attachment #2: Type: text/html, Size: 3588 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Announcing zsh-scan, a zsh-linter
  2023-01-31  7:37   ` Sebastian Gniazdowski
@ 2023-01-31 14:09     ` Ray Andrews
  0 siblings, 0 replies; 4+ messages in thread
From: Ray Andrews @ 2023-01-31 14:09 UTC (permalink / raw)
  To: zsh-users

[-- Attachment #1: Type: text/plain, Size: 213 bytes --]


On 2023-01-30 23:37, Sebastian Gniazdowski wrote:
> Also added: reporting on exact missing setopt options – till now it 
> was showing all recommended options, now it filters out the already given.

Busy guy!


[-- Attachment #2: Type: text/html, Size: 772 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-01-31 14:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-28  9:19 Announcing zsh-scan, a zsh-linter Sebastian Gniazdowski
2023-01-28 20:26 ` Sebastian Gniazdowski
2023-01-31  7:37   ` Sebastian Gniazdowski
2023-01-31 14:09     ` Ray Andrews

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).