Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(104)

Issue 1418533004: Unsupported analysis option validation. (Closed)

Created:
5 years, 2 months ago by pquitslund
Modified:
5 years, 2 months ago
CC:
reviews_dartlang.org
Base URL:
git@github.com:dart-lang/sdk.git@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Patch Set 1 #

Total comments: 6

Patch Set 2 : Warning type fix. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+151 lines, -9 lines) Patch
M pkg/analyzer/lib/src/generated/error.dart View 1 3 chunks +32 lines, -8 lines 0 comments Download
M pkg/analyzer/lib/src/task/options.dart View 4 chunks +61 lines, -1 line 0 comments Download
M pkg/analyzer/test/src/task/options_test.dart View 4 chunks +58 lines, -0 lines 0 comments Download

Messages

Total messages: 7 (1 generated)
pquitslund
Note the TODO to surface an extension point to contribute validators. Unless you disagree that ...
5 years, 2 months ago (2015-10-21 20:54:13 UTC) #2
scheglov
LGTM https://codereview.chromium.org/1418533004/diff/1/pkg/analyzer/lib/src/generated/error.dart File pkg/analyzer/lib/src/generated/error.dart (right): https://codereview.chromium.org/1418533004/diff/1/pkg/analyzer/lib/src/generated/error.dart#newcode350 pkg/analyzer/lib/src/generated/error.dart:350: ErrorType get type => ErrorType.COMPILE_TIME_ERROR; STATIC_WARNING?
5 years, 2 months ago (2015-10-21 21:01:24 UTC) #3
pquitslund
Thanks! https://codereview.chromium.org/1418533004/diff/1/pkg/analyzer/lib/src/generated/error.dart File pkg/analyzer/lib/src/generated/error.dart (right): https://codereview.chromium.org/1418533004/diff/1/pkg/analyzer/lib/src/generated/error.dart#newcode350 pkg/analyzer/lib/src/generated/error.dart:350: ErrorType get type => ErrorType.COMPILE_TIME_ERROR; On 2015/10/21 21:01:24, ...
5 years, 2 months ago (2015-10-21 21:04:51 UTC) #4
Brian Wilkerson
https://codereview.chromium.org/1418533004/diff/1/pkg/analyzer/lib/src/generated/error.dart File pkg/analyzer/lib/src/generated/error.dart (left): https://codereview.chromium.org/1418533004/diff/1/pkg/analyzer/lib/src/generated/error.dart#oldcode313 pkg/analyzer/lib/src/generated/error.dart:313: * Initialize a newly created error code to have ...
5 years, 2 months ago (2015-10-21 21:13:58 UTC) #5
pquitslund
Committed patchset #2 (id:20001) manually as fb8cc0aa39e911cb0119a434ba6ea9e6e9ad76af (presubmit successful).
5 years, 2 months ago (2015-10-21 21:14:04 UTC) #6
pquitslund
5 years, 2 months ago (2015-10-21 21:29:28 UTC) #7
Message was sent while issue was closed.
Thanks for the comments.  I'll address in a follow-up CL.

On 2015/10/21 21:13:58, Brian Wilkerson wrote:
>
https://codereview.chromium.org/1418533004/diff/1/pkg/analyzer/lib/src/genera...
> File pkg/analyzer/lib/src/generated/error.dart (left):
> 
>
https://codereview.chromium.org/1418533004/diff/1/pkg/analyzer/lib/src/genera...
> pkg/analyzer/lib/src/generated/error.dart:313: * Initialize a newly created
> error code to have the given [name]. The message
> Not sure why you'd want to drop the documentation. As far as I can see it's
> still accurate.

Sorry!  Looked like boilerplate to me...  Shall I add back?

> 
>
https://codereview.chromium.org/1418533004/diff/1/pkg/analyzer/lib/src/task/o...
> File pkg/analyzer/lib/src/task/options.dart (right):
> 
>
https://codereview.chromium.org/1418533004/diff/1/pkg/analyzer/lib/src/task/o...
> pkg/analyzer/lib/src/task/options.dart:102: AnalysisError _unsupportedOption(
> Consider making this utility method a public instance method on
OptionsValidator
> so that validators that are not implemented in this library can also use it.

Agreed.  Meta-point: we should talk about a nice API here.  For example, I don't
think validators need to know about Sources but we need them to create errors.

> 
>
https://codereview.chromium.org/1418533004/diff/1/pkg/analyzer/lib/src/task/o...
> pkg/analyzer/lib/src/task/options.dart:111: List<AnalysisError>
validate(Source
> source, Map<String, YamlNode> options);
> Consider passing in an ErrorReporter rather than the Source.
> 
>
https://codereview.chromium.org/1418533004/diff/1/pkg/analyzer/lib/src/task/o...
> pkg/analyzer/lib/src/task/options.dart:124: YamlNode node =
options['analyzer'];
> Make 'analyzer' a constant?

Absolutely.  I'm thinking we could have a base class that handles this general
case (plugins with a list of top-level options).  Again: this is part of the API
conversation.

Powered by Google App Engine
This is Rietveld 408576698