Make WordPress Core

Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#25992 closed defect (bug) (fixed)

grunt jshint file filtering fails with long filenames

Reported by: atimmer Owned by: azaozz
Priority: normal Milestone: 3.8
Component: Build/Test Tools Version: 3.8
Severity: normal Keywords: has-patch
Cc: Focuses:

Description

"grunt jshint:core --file=password-strength-meter.js" shows more than only password-strength-meter.js because other paths for other files are the same length as the whole filename.

Attached patch fixes this by making sure indexOf is not -1.

Attachments (1)

25992.1.diff (735 bytes ) - added by atimmer 13 years ago.

Download all attachments as: .zip

Change History (3)

@atimmer
13 years ago

#1 @azaozz
13 years ago

  • Owner set to azaozz
  • Resolutionfixed
  • Status newclosed

In 26168:

Grunt jshint: ensure the file passed with --file=filename.js matches all or part of the filepath before checking string lengths. Makes it possible to pass a file with full or partial path. All of these would work properly:
admin-bar.js, wp-includes/js/admin-bar.js, src/wp-includes/js/admin-bar.js. Props atimmer, fixes #25992.

#2 @azaozz
13 years ago

  • Milestone Awaiting Review3.8
Note: See TracTickets for help on using tickets.