Re: [Wikitech-l] Deploying the Linter extension to Wikimedia wikis

2016-12-10 Thread MZMcBride
Legoktm wrote:
>>Does the extension distinguish between errors and warnings? Are there
>> gradations of errors? For example, deprecated syntax v. invalid syntax?
>
>Not really. Each category has a name like "obsolete-tag" or
>"bogus-image-options", and that's about it.

There's now .

Subramanya Sastry wrote:
>On 10/24/2016 08:42 AM, MZMcBride wrote:
>>Does the extension distinguish between errors and warnings? Are there
>>gradations of errors? For example, deprecated syntax v. invalid syntax?
>
>Technically, there are no errors with wikitext ... but yes, Parsoid
>knows what some of these "errors" are and they are tagged with different
>category names which can be tweaked as necessary. And, other
>deprecations can be targeted and marked up.

I'm not sure what this technically means. There are no errors with
wikitext in what sense?

If I open a  tag and there's no closing tag, is that an error?
What about partial heading syntax (such as "== foo" at the start of a
line) or unclosed HTML comments 

Re: [Wikitech-l] Deploying the Linter extension to Wikimedia wikis

2016-10-25 Thread Legoktm
Hi,

On 10/24/2016 06:42 AM, MZMcBride wrote:
> How will the errors be queried? Will be there an api.php module to query
> on a per-error or per-page basis?

Yes, per-error is implemented, and I've also implemented per-namespace
filtering, but not per-page yet.

> Does the extension distinguish between errors and warnings? Are there
> gradations of errors? For example, deprecated syntax v. invalid syntax?

Not really. Each category has a name like "obsolete-tag" or
"bogus-image-options", and that's about it.

> I wonder if the name "Linter" is overly generic. This extension will only
> activate on wikitext, correct? It won't lint other content models/types
> such as JavaScript and CSS?

The Linter extension doesn't care about that at all - it gets told about
errors from Parsoid (or any whitelisted service) stores them, and
displays them to users. So if someone set up a JSCS service or something
to provide errors about JavaScript pages, we could hook up that to
Linter. (There's currently only one line of code in Linter that's
Parsoid-specific).

-- Legoktm

___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Re: [Wikitech-l] Deploying the Linter extension to Wikimedia wikis

2016-10-24 Thread Subramanya Sastry

On 10/24/2016 08:42 AM, MZMcBride wrote:


Does the extension distinguish between errors and warnings? Are there
gradations of errors? For example, deprecated syntax v. invalid syntax?


Technically, there are no errors with wikitext ... but yes, Parsoid 
knows what some of these "errors" are and they are tagged with different 
category names which can be tweaked as necessary. And, other 
deprecations can be targeted and marked up.



I wonder if the name "Linter" is overly generic. This extension will only
activate on wikitext, correct? It won't lint other content models/types
such as JavaScript and CSS?
Maybe WikiLint? That could play on the notion that, for most users, wiki 
= wikitext.


-S.

___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Re: [Wikitech-l] Deploying the Linter extension to Wikimedia wikis

2016-10-24 Thread MZMcBride
Legoktm wrote:
>Arlo and myself have been working on a new MediaWiki extension to expose
>Parsoid's "lint errors" to users.
>
>[...]
>
>The main advantage of this over tracking categories is that we know the
>location in the wikitext so it should be easier to identify the error
>and fix it, as well as knowing whether the issue was caused via a
>template or not.

Nice.

(I haven't read/skimmed any of the code yet.)

How will the errors be queried? Will be there an api.php module to query
on a per-error or per-page basis?

Does the extension distinguish between errors and warnings? Are there
gradations of errors? For example, deprecated syntax v. invalid syntax?

I wonder if the name "Linter" is overly generic. This extension will only
activate on wikitext, correct? It won't lint other content models/types
such as JavaScript and CSS?

MZMcBride



___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Re: [Wikitech-l] Deploying the Linter extension to Wikimedia wikis

2016-10-22 Thread BinĂ¡ris
Sounds well, looking forward to see it in practice. :-)
___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

[Wikitech-l] Deploying the Linter extension to Wikimedia wikis

2016-10-22 Thread Legoktm
Hi,

Arlo and myself have been working on a new MediaWiki extension to expose
Parsoid's "lint errors" to users.

A little bit of background, Parsoid has a linter that identifies some
issues in wikitext that while may not result in user-facing errors, are
still not wanted in wikitext. An example might be
[[File:Example.png|foo|bar|baz]]. In this case, "foo" and "bar" are
ignored, and "baz" is the actual caption - but the bogus image options
should be removed. Other errors include missing end tags, obsolete HTML
tags, fostered content, etc.

The main advantage of this over tracking categories is that we know the
location in the wikitext so it should be easier to identify the error
and fix it, as well as knowing whether the issue was caused via a
template or not.

The main ticket tracking deployment is
.

-- Legoktm

___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l