Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hint about non-useful concat being possible typo #15199

Closed
stevemessick opened this issue Nov 20, 2013 · 6 comments
Closed

Hint about non-useful concat being possible typo #15199

stevemessick opened this issue Nov 20, 2013 · 6 comments
Labels
analyzer-linter Issues with the analyzer's support for the linter package area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. closed-obsolete Closed as the reported issue is no longer relevant P2 A bug or feature request we're likely to work on type-enhancement A request for a change that isn't a bug

Comments

@stevemessick
Copy link
Contributor

I could wish for a hint when I'm concatenating adjacent strings together when it's at least possible I mean something else. e.g.

  path.join(path.dirname(scriptDir), 'doc' 'sdk-introduction.md');

where the method I'm calling at least has the ability to take an additional parameter, and I'm concatenating two constant strings on the same line, which really doesn't gain me anything.

Alan Knight
////////////////////////////////////////////////////////////////////////////////////
Editor: 1.0.0_r30187 (2013-11-12)
OS: Mac OS X - x86_64 (10.8.5)
JVM: 1.6.0_65

projects: 3

open dart files: 45

auto-run pub: false
localhost resolves to: 127.0.0.1
mem max/total/free: 1983 / 681 / 246 MB
thread count: 48
index: 702637 relationships in 142552 keys in 604 sources

SDK installed: true
Dartium installed: true

@lrhn
Copy link
Member

lrhn commented Nov 21, 2013

I guess you'd want a warning for the case where two string literals are adjacent and:

  • one the same line
  • with the same quotes/rawness/multilineness
    That is, when they could be combined without any issue.

@clayberg
Copy link

clayberg commented Apr 1, 2014

Added Analyzer-Hint label.

@kasperl
Copy link

kasperl commented Jul 10, 2014

Removed this from the Later milestone.
Added Oldschool-Milestone-Later label.

@kasperl
Copy link

kasperl commented Aug 4, 2014

Removed Oldschool-Milestone-Later label.

@alan-knight
Copy link
Contributor

Issue #13844 has been merged into this issue.

@stevemessick stevemessick added Type-Enhancement area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. analyzer-warning Issues with the analyzer's Warning codes labels Jan 20, 2015
@kevmoo kevmoo added P2 A bug or feature request we're likely to work on type-enhancement A request for a change that isn't a bug and removed triaged labels Feb 29, 2016
@srawlins
Copy link
Member

This has the strong possibility of yielding false positives. Should this be a linter instead? Similar to dart-lang/linter#225.

@bwilkerson bwilkerson added analyzer-linter Issues with the analyzer's support for the linter package and removed analyzer-warning Issues with the analyzer's Warning codes labels Apr 19, 2016
@bwilkerson bwilkerson removed their assignment Aug 15, 2016
@matanlurey matanlurey added the closed-obsolete Closed as the reported issue is no longer relevant label Jun 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
analyzer-linter Issues with the analyzer's support for the linter package area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. closed-obsolete Closed as the reported issue is no longer relevant P2 A bug or feature request we're likely to work on type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

9 participants