Make WordPress Core

Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#25992 closed defect (bug) (fixed)

grunt jshint file filtering fails with long filenames

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

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 12 years ago.

Download all attachments as: .zip

Change History (3)

@atimmer
12 years ago

#1 @azaozz
12 years ago

  • Owner set to azaozz
  • Resolution set to fixed
  • Status changed from new to closed

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
12 years ago

  • Milestone changed from Awaiting Review to 3.8
Note: See TracTickets for help on using tickets.