errata-ai / IBM

A Vale-compatible implementation of IBM's Developer Editorial Style Guide.
MIT License
23 stars 10 forks source link

Add second person rule #5

Open ChrisChinchilla opened 4 years ago

gaurav-nelson commented 4 years ago

I agree, we should use existence to check the usage of "I" and "we".

ChrisChinchilla commented 4 years ago

Hmm, my reasoning was for more of a check on consistency, so the predominance of using "I" in a doc, instead of "we". If we just check for existence, then it's not so useful without context, which is not something Vale can do.

Unless I am misunderstanding what you both mean, I kind of see how both could do the same, but the consistency part was my reasoning.

jdkato commented 4 years ago

I think I understand your intent better now. The part of the description that says

"I" in single-author articles or "we" in multiple-author articles

could indeed be a candidate for consistency since an article can't be both single- and multi-author. (As written, though, the rule involves "we" and "you"; not "we" and "I" ...?)

If we just check for existence, then it's not so useful without context, which is not something Vale can do.

IMO, this is an ideal case for a sub-error level rule (which can be selectively disabled): It alerts writers to the fact that, according to the style guide, that they're only supposed to use "I" and "we" in certain contexts without explicitly telling them that they're doing something "wrong" (which they might not be). The alternative (limiting ourselves to precise, error-candidate rules), means we'll end up covering much less of the style guide.


Basically, from my understanding of the discussion so far, we're looking at the two following rules:

extends: consistency
message: 'Use "I" in single-author articles or "we" in multiple-author articles.'
level: error
link: https://www.ibm.com/developerworks/library/styleguidelines/#N10050
either:
  I: we 

and

extends: existence
message: 'Only use "%s" when referring to yourself, the author(s).'
level: warning
link: https://www.ibm.com/developerworks/library/styleguidelines/#N10050
tokens:
    - I
    - we

Does this seem right?

ChrisChinchilla commented 4 years ago

Huh, interesting, I think I need to try implementing to see if it matches, but makes sense.

Is "sub-error level rule" an actual thing @jdkato or did you just use that as a description?

jdkato commented 4 years ago

By "sub-error" I meant warning or suggestion, which don't result in non-zero return codes.

ChrisChinchilla commented 4 years ago

By "sub-error" I meant warning or suggestion, which don't result in non-zero return codes.

Ah ha, OK, yes, I tend to err on that side of caution for "warnings" anyway.

ChrisChinchilla commented 4 years ago

OK, reminded to get back to this PR