ReSpec: linter

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

ReSpec: linter

Marcos Caceres-5
Hi ReSpec Users,

As part of the W3C's transition to TLS docs on /TR/, we've added a
simple linter to ReSpec to check that the URLs in your `respecConfig`
are using TLS.

The linter is disabled by default right now. You can enable it by
adding the following to your `respecConfig`:

```
lint: true,
```

You can access the warnings through the ReSpec pill on the top-right,
as per usual. If no warnings show up there, you are all good :)

The linter also warns if you don't have a Privacy and/or Security
Considerations section in your spec, with a helpful link to a
questionnaire that can help you write such sections.

Once the W3C transitions to TLS on /TR/ (in ~2 weeks), we will enable
the linter by default to help you easily fix such warnings.

Kind regards,
Marcos

Reply | Threaded
Open this post in threaded view
|

Re: ReSpec: linter

Wendy Seltzer-3
On 07/14/2016 02:54 AM, Marcos Caceres wrote:
> Hi ReSpec Users,
+cc PING

>
> As part of the W3C's transition to TLS docs on /TR/, we've added a
> simple linter to ReSpec to check that the URLs in your `respecConfig`
> are using TLS.
>
> The linter is disabled by default right now. You can enable it by
> adding the following to your `respecConfig`:
>
> ```
> lint: true,
> ```
>
> You can access the warnings through the ReSpec pill on the top-right,
> as per usual. If no warnings show up there, you are all good :)
>
> The linter also warns if you don't have a Privacy and/or Security
> Considerations section in your spec, with a helpful link to a
> questionnaire that can help you write such sections.

Thanks Marcos, that's great!

--Wendy

>
> Once the W3C transitions to TLS on /TR/ (in ~2 weeks), we will enable
> the linter by default to help you easily fix such warnings.
>
> Kind regards,
> Marcos
>


--
Wendy Seltzer -- [hidden email] +1.617.715.4883 (office)
Policy Counsel and Domain Lead, World Wide Web Consortium (W3C)
https://wendy.seltzer.org/        +1.617.863.0613 (mobile)


Reply | Threaded
Open this post in threaded view
|

Re: ReSpec: linter

Shane McCarron-6
BTW I have suggested we also add some a11y checking to this.  I don't yet know what that will be.  I am asking the APA and ARIA groups for input on it.  But I wonder if there shouldn't also be a check for an a11y considerations section.  I have raised an issue against specberus to discuss that with the relevant players. [1]  Please feel free to comment here or against that issue.




On Thu, Jul 14, 2016 at 8:06 AM, Wendy Seltzer <[hidden email]> wrote:
On 07/14/2016 02:54 AM, Marcos Caceres wrote:
> Hi ReSpec Users,
+cc PING

>
> As part of the W3C's transition to TLS docs on /TR/, we've added a
> simple linter to ReSpec to check that the URLs in your `respecConfig`
> are using TLS.
>
> The linter is disabled by default right now. You can enable it by
> adding the following to your `respecConfig`:
>
> ```
> lint: true,
> ```
>
> You can access the warnings through the ReSpec pill on the top-right,
> as per usual. If no warnings show up there, you are all good :)
>
> The linter also warns if you don't have a Privacy and/or Security
> Considerations section in your spec, with a helpful link to a
> questionnaire that can help you write such sections.

Thanks Marcos, that's great!

--Wendy

>
> Once the W3C transitions to TLS on /TR/ (in ~2 weeks), we will enable
> the linter by default to help you easily fix such warnings.
>
> Kind regards,
> Marcos
>


--
Wendy Seltzer -- [hidden email] <a href="tel:%2B1.617.715.4883" value="+16177154883">+1.617.715.4883 (office)
Policy Counsel and Domain Lead, World Wide Web Consortium (W3C)
https://wendy.seltzer.org/        <a href="tel:%2B1.617.863.0613" value="+16178630613">+1.617.863.0613 (mobile)





--
Shane McCarron
Projects Manager, Spec-Ops
Reply | Threaded
Open this post in threaded view
|

Re: ReSpec: linter

r12a
On 14/07/2016 14:13, Shane McCarron wrote:
> BTW I have suggested we also add some a11y checking to this.  I don't
> yet know what that will be.  I am asking the APA and ARIA groups for
> input on it.  But I wonder if there shouldn't also be a check for an
> a11y considerations section.  I have raised an issue against specberus
> to discuss that with the relevant players. [1]  Please feel free to
> comment here or against that issue.

Perhaps we could check for some basic i18n stuff too.  For example:
- html tag should have lang attribute
- char encoding must be present and must be utf-8
- char encoding must be within 1024 bytes of page start
- meta content-language should not be used
- xml:lang attributes should not appear in the page


ri

Reply | Threaded
Open this post in threaded view
|

Re: ReSpec: linter

Shane McCarron-7

Good ideas...  except for xml:lang.  Rdfa can use that in some circumstances.

On Jul 14, 2016 2:05 PM, <[hidden email]> wrote:
On 14/07/2016 14:13, Shane McCarron wrote:
BTW I have suggested we also add some a11y checking to this.  I don't
yet know what that will be.  I am asking the APA and ARIA groups for
input on it.  But I wonder if there shouldn't also be a check for an
a11y considerations section.  I have raised an issue against specberus
to discuss that with the relevant players. [1]  Please feel free to
comment here or against that issue.

Perhaps we could check for some basic i18n stuff too.  For example:
- html tag should have lang attribute
- char encoding must be present and must be utf-8
- char encoding must be within 1024 bytes of page start
- meta content-language should not be used
- xml:lang attributes should not appear in the page


ri

Reply | Threaded
Open this post in threaded view
|

Re: ReSpec: linter

Marcos Caceres-4
In reply to this post by r12a
On July 15, 2016 at 5:05:14 AM, [hidden email] ([hidden email]) wrote:

> On 14/07/2016 14:13, Shane McCarron wrote:
> > BTW I have suggested we also add some a11y checking to this. I don't
> > yet know what that will be. I am asking the APA and ARIA groups for
> > input on it. But I wonder if there shouldn't also be a check for an
> > a11y considerations section. I have raised an issue against specberus
> > to discuss that with the relevant players. [1] Please feel free to
> > comment here or against that issue.
>
> Perhaps we could check for some basic i18n stuff too. For example:
> - html tag should have lang attribute

We default this to "en" if missing.

> - char encoding must be present and must be utf-8

Can check with: "document.charset", so doable.

> - char encoding must be within 1024 bytes of page start

We got bit by this recently, so we now move the the meta@charset to be
first child in the head on save... so, at least, generated files won't
have any issues.

> - meta content-language should not be used

Yeah, easy one. Have you seen any spec do this?

> - xml:lang attributes should not appear in the page

W3C doesn't publish XHTML anymore, so this one probably won't matter.

Good suggestions. The "document.charset === 'utf-8'" is probably the
lowest hanging fruit.

Reply | Threaded
Open this post in threaded view
|

Re: ReSpec: linter

r12a
On 15/07/2016 07:08, Marcos Caceres wrote:

> On July 15, 2016 at 5:05:14 AM, [hidden email] ([hidden email]) wrote:
>> On 14/07/2016 14:13, Shane McCarron wrote:
>>> BTW I have suggested we also add some a11y checking to this. I don't
>>> yet know what that will be. I am asking the APA and ARIA groups for
>>> input on it. But I wonder if there shouldn't also be a check for an
>>> a11y considerations section. I have raised an issue against specberus
>>> to discuss that with the relevant players. [1] Please feel free to
>>> comment here or against that issue.
>>
>> Perhaps we could check for some basic i18n stuff too. For example:
>> - html tag should have lang attribute
>
> We default this to "en" if missing.

i guess this is ok for most TR stuff, and the validator should now catch
exceptions.

>> - char encoding must be present and must be utf-8

> Can check with: "document.charset", so doable.
>
>> - char encoding must be within 1024 bytes of page start
>
> We got bit by this recently, so we now move the the meta@charset to be
> first child in the head on save... so, at least, generated files won't
> have any issues.

sounds good

>> - meta content-language should not be used
>
> Yeah, easy one. Have you seen any spec do this?

no i haven't - just precautionary

>> - xml:lang attributes should not appear in the page
>
> W3C doesn't publish XHTML anymore, so this one probably won't matter.
>
> Good suggestions. The "document.charset === 'utf-8'" is probably the
> lowest hanging fruit.

yes, and useful since i heard of a WD published quite recently that
wasn't in utf-8 (!)

thanks Shane and Marcos
ri



Reply | Threaded
Open this post in threaded view
|

Re: ReSpec: linter

Marcos Caceres-4
On July 15, 2016 at 4:21:49 PM, [hidden email] ([hidden email]) wrote:
> On 15/07/2016 07:08, Marcos Caceres wrote:
> > On July 15, 2016 at 5:05:14 AM, [hidden email] ([hidden email]) wrote:
> > Good suggestions. The "document.charset === 'utf-8'" is probably the
> > lowest hanging fruit.
>
> yes, and useful since i heard of a WD published quite recently that
> wasn't in utf-8 (!)

Filed feature request:
https://github.com/w3c/respec/issues/873