New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 861966 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Aug 3
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Feature



Sign in to add a comment

Add a Tricium spellchecker analyzer

Project Member Reported by qyearsley@google.com, Jul 9

Issue description

Petr recently brought this up in chat:

> Ideally we would just combine https://github.com/client9/gospell with https://chromium.googlesource.com/chromium/deps/hunspell_dictionaries which shouldn't be too much work.

It's worth noting that in the Tricorder docs, they explicitly say:

> Unsupported types of analyzers:
> ...
> - Spellcheckers. Developers do not generally wish to be notified of spelling errors, and they have a high false positive rate due to the number of acronyms we use regularly.

I still personally think that a spellchecker is a good idea, but it must be conservative and it must not be too noisy.

I think that this may mean that:
 
 1. We probably just want to check comments.
 2. We want to allow people to use specialized words and acronyms that will never appear in any dictionary. Maybe a "dictionary of common misspellings" approach would work, like how https://github.com/codespell-project/codespell works (dictionary: https://github.com/codespell-project/codespell/blob/master/codespell_lib/data/dictionary.txt).
 
Owner: diegomtzg@google.com
Status: Assigned (was: Available)
Assigning to Diego now since he has now started looking at this.
Project Member

Comment 2 by bugdroid1@chromium.org, Jul 19

The following revision refers to this bug:
  https://chrome-internal.googlesource.com/infradata/config/+/d9040101ddb5cd06c94fc02b10c1faed65c1e68d

commit d9040101ddb5cd06c94fc02b10c1faed65c1e68d
Author: Diego Martinez <diegomtzg@google.com>
Date: Thu Jul 19 20:59:39 2018

Project Member

Comment 3 by bugdroid1@chromium.org, Jul 19

Labels: merge-merged-config
The following revision refers to this bug:
  https://chromium.googlesource.com/playground/gerrit-tricium/+/5640a578873b3e3f7891465fde3912704119b6ac

commit 5640a578873b3e3f7891465fde3912704119b6ac
Author: Diego Martinez <diegomtzg@google.com>
Date: Thu Jul 19 22:01:13 2018

[tricium] Add spellchecker

Bug:  861966 
Change-Id: I63f55905d3b71feb56324caaecae4f0cb5bc702c
[modify] https://crrev.com/5640a578873b3e3f7891465fde3912704119b6ac/tricium-dev.cfg

Project Member

Comment 5 by bugdroid1@chromium.org, Jul 20

The following revision refers to this bug:
  https://chromium.googlesource.com/infra/infra/+/55e95fd1c5a2653c4fa2f16df7879bccb00ed750

commit 55e95fd1c5a2653c4fa2f16df7879bccb00ed750
Author: Diego Martinez <diegomtzg@google.com>
Date: Fri Jul 20 21:38:46 2018

[tricium] SpellChecker bug fixes

Output now being correctly shown on Gerrit.
Word range is added to comment to highlight only the misspelled word.
Support multiple misspelled words per line.

Bug:  861966 
Change-Id: Ic8013d536b07701c92c8e48b6793bdade79328df
Reviewed-on: https://chromium-review.googlesource.com/1145679
Commit-Queue: Diego Martinez <diegomtzg@google.com>
Reviewed-by: Marc-Antoine Ruel <maruel@chromium.org>
Reviewed-by: Quinten Yearsley <qyearsley@chromium.org>

[modify] https://crrev.com/55e95fd1c5a2653c4fa2f16df7879bccb00ed750/go/src/infra/tricium/functions/spellchecker/spellchecker_test.go
[modify] https://crrev.com/55e95fd1c5a2653c4fa2f16df7879bccb00ed750/go/src/infra/tricium/functions/spellchecker/spellchecker.go
[modify] https://crrev.com/55e95fd1c5a2653c4fa2f16df7879bccb00ed750/go/src/infra/tricium/functions/spellchecker/Makefile
[modify] https://crrev.com/55e95fd1c5a2653c4fa2f16df7879bccb00ed750/go/src/infra/tricium/functions/spellchecker/README.md

Project Member

Comment 6 by bugdroid1@chromium.org, Jul 23

The following revision refers to this bug:
  https://chromium.googlesource.com/infra/infra/+/85c2310920e7c2e77532eb80df05154fd01ab2b8

commit 85c2310920e7c2e77532eb80df05154fd01ab2b8
Author: Quinten Yearsley <qyearsley@chromium.org>
Date: Mon Jul 23 20:44:30 2018

[tricium] Enable Spellchecker in the infra repo

An initial version of the spellchecker analyzer (using codespell) is now added;
we can now enable it in the infra repo for a period of time before enabling it
in other repos.

Bug:  861966 
Change-Id: I9d0fc9d95463f09c6067d9f9d0bfe2b65ae87389
Reviewed-on: https://chromium-review.googlesource.com/1147245
Reviewed-by: Marc-Antoine Ruel <maruel@chromium.org>
Commit-Queue: Quinten Yearsley <qyearsley@chromium.org>

[modify] https://crrev.com/85c2310920e7c2e77532eb80df05154fd01ab2b8/tricium-dev.cfg

Project Member

Comment 7 by bugdroid1@chromium.org, Jul 23

The following revision refers to this bug:
  https://chromium.googlesource.com/infra/infra/+/eb52e5044495208632678c1d11bf4b597e77832f

commit eb52e5044495208632678c1d11bf4b597e77832f
Author: Quinten Yearsley <qyearsley@chromium.org>
Date: Mon Jul 23 20:58:40 2018

[tricium] infra project config: Fix spelling of SpellChecker

The new analyzer name is "SpellChecker", not "Spellchecker", as defined in: https://chromium.googlesource.com/playground/gerrit-tricium/+/c29bc7253b0fc71bc1046eff290b2720f06f6860/tricium-dev.cfg

This is a correction to https://crrev.com/c/1147245.

Bug:  861966 
Change-Id: I26ad26de7dafa43b424645ebe4cffc7b18abcff5
Reviewed-on: https://chromium-review.googlesource.com/1147424
Reviewed-by: Marc-Antoine Ruel <maruel@chromium.org>
Commit-Queue: Marc-Antoine Ruel <maruel@chromium.org>

[modify] https://crrev.com/eb52e5044495208632678c1d11bf4b597e77832f/tricium-dev.cfg

Project Member

Comment 8 by bugdroid1@chromium.org, Jul 24

The following revision refers to this bug:
  https://chrome-internal.googlesource.com/infradata/config/+/ed6d1e2d4515529daa9667cbf7de5f3e12da9e7f

commit ed6d1e2d4515529daa9667cbf7de5f3e12da9e7f
Author: Quinten Yearsley <qyearsley@chromium.org>
Date: Tue Jul 24 16:37:52 2018

Project Member

Comment 9 by bugdroid1@chromium.org, Jul 24

The following revision refers to this bug:
  https://chromium.googlesource.com/infra/infra/+/e0a0521a345354e01972d04e9b3e5b083e23134f

commit e0a0521a345354e01972d04e9b3e5b083e23134f
Author: Diego Martinez <diegomtzg@google.com>
Date: Tue Jul 24 18:42:49 2018

SpellChecker improvements

The SpellChecker analyzer now sends fix suggestions to Gerrit and ignores misspelling fixes
that have a "reason" to be disabled in the default CodeSpell dictionary.

Bug:  861966 
Change-Id: I09b08acc1e1b943ece093c5648d82c0cdcd401f1
Reviewed-on: https://chromium-review.googlesource.com/1147313
Reviewed-by: Marc-Antoine Ruel <maruel@chromium.org>
Reviewed-by: Quinten Yearsley <qyearsley@chromium.org>
Commit-Queue: Diego Martinez <diegomtzg@google.com>

[modify] https://crrev.com/e0a0521a345354e01972d04e9b3e5b083e23134f/go/src/infra/tricium/functions/spellchecker/spellchecker_test.go
[modify] https://crrev.com/e0a0521a345354e01972d04e9b3e5b083e23134f/go/src/infra/tricium/functions/spellchecker/spellchecker.go

Project Member

Comment 10 by bugdroid1@chromium.org, Jul 24

The following revision refers to this bug:
  https://chromium.googlesource.com/infra/infra/+/8beffb653a5f349b6bda8e3f061b1687359f680d

commit 8beffb653a5f349b6bda8e3f061b1687359f680d
Author: Diego Martinez <diegomtzg@google.com>
Date: Tue Jul 24 21:19:20 2018

SpellChecker word comparison changed to be case-insensitive

For example, some of the files in the infra repo use GAE in the comments, so we should consider both "gae"
and "GAE" as whitelisted words.

Bug:  861966 
Change-Id: I69a87907fe8b232a6b93be15d93c51280dcc8abc
Reviewed-on: https://chromium-review.googlesource.com/1148882
Commit-Queue: Diego Martinez <diegomtzg@google.com>
Reviewed-by: Quinten Yearsley <qyearsley@chromium.org>

[modify] https://crrev.com/8beffb653a5f349b6bda8e3f061b1687359f680d/go/src/infra/tricium/functions/spellchecker/spellchecker_test.go
[modify] https://crrev.com/8beffb653a5f349b6bda8e3f061b1687359f680d/go/src/infra/tricium/functions/spellchecker/spellchecker.go

Project Member

Comment 11 by bugdroid1@chromium.org, Jul 25

The following revision refers to this bug:
  https://chromium.googlesource.com/infra/infra/+/be4350e06ce500c4588040caf69a1a9076d73f12

commit be4350e06ce500c4588040caf69a1a9076d73f12
Author: Diego Martinez <diegomtzg@google.com>
Date: Wed Jul 25 21:22:04 2018

Minor spellchecker fix

Bug:  861966 
Change-Id: I9d7275db674a4785510f0d7db78e7cb992f20890
Reviewed-on: https://chromium-review.googlesource.com/1150626
Commit-Queue: Diego Martinez <diegomtzg@google.com>
Reviewed-by: Quinten Yearsley <qyearsley@chromium.org>

[modify] https://crrev.com/be4350e06ce500c4588040caf69a1a9076d73f12/go/src/infra/tricium/functions/spellchecker/spellchecker.go

Status: Fixed (was: Assigned)

Sign in to add a comment