gulp-scss-lint icon indicating copy to clipboard operation
gulp-scss-lint copied to clipboard

Doesn't lint some of the files every run

Open littlebigbot opened this issue 10 years ago • 5 comments

I made sure the glob matches every file I need with glob-test and here's my scss-lint task:

  gulp.task('scss-lint', function() {
    return gulp.src([
      './src/**/*.scss',
      '!./src/styles/images/sprite.scss' // file generated by another task
    ])
      .pipe(scsslint({
        config: '.scss-lint.yml'
      }));
  });

There's a few files that only get linted sometimes. This is me running that scss-lint task without any changes to the scss:

 ~/repo$ gulp scss-lint
[15:06:16] Using gulpfile  ~/repo/Gulpfile.js
[15:06:16] Starting 'scss-lint'...
[15:06:21] Finished 'scss-lint' after 4.73 s
~/repo$ gulp scss-lint
[15:06:32] Using gulpfile ~/repo/Gulpfile.js
[15:06:32] Starting 'scss-lint'...
[15:06:38] 1 issues found in /Users/littlebigbot/repo/src/styles/components/table.scss
[15:06:38] styles/components/table.scss:20 [W] QualifyingElement: Avoid qualifying attribute selectors with an element.
[15:06:38] Finished 'scss-lint' after 5.62 s
 ~/repo$ gulp scss-lint
[15:08:41] Using gulpfile ~/repo/Gulpfile.js
[15:08:41] Starting 'scss-lint'...
[15:08:45] Finished 'scss-lint' after 4.25 s
~/repo$ gulp scss-lint
[15:08:49] Using gulpfile ~/repo/Gulpfile.js
[15:08:49] Starting 'scss-lint'...
[15:08:53] Finished 'scss-lint' after 4.46 s

littlebigbot avatar Apr 29 '15 20:04 littlebigbot

I don't know exactly what it is happening. Could you add the verbose option? thanks

juanfran avatar May 01 '15 15:05 juanfran

Each bundle exec scss-lint contains the offending file, /Users/littlebigbot/repo/src/styles/components/table.scss but still only caught sometimes (it fails less often in vebose mode, though)

[10:05:09] Using gulpfile ~/repo/Gulpfile.js
[10:05:09] Starting 'scss-lint'...
bundle exec scss-lint /Users/littlebigbot/repo/src/main.scss /Users/littlebigbot/repo/src/modules/analytics/analytics.scss /Users/littlebigbot/repo/src/modules/application/application.scss /Users/littlebigbot/repo/src/modules/a-thing/a-thing-form.scss /Users/littlebigbot/repo/src/modules/a-thing/a-thing.scss /Users/littlebigbot/repo/src/modules/error-page/404.scss /Users/littlebigbot/repo/src/modules/error-page/500.scss /Users/littlebigbot/repo/src/modules/error-page/error-page.scss /Users/littlebigbot/repo/src/modules/landing-page/landing.scss /Users/littlebigbot/repo/src/modules/login-page/login.scss /Users/littlebigbot/repo/src/modules/menu/global-menu.scss /Users/littlebigbot/repo/src/modules/menu/menu-collapsed.scss /Users/littlebigbot/repo/src/modules/menu/menu.scss /Users/littlebigbot/repo/src/modules/modal/modal.scss /Users/littlebigbot/repo/src/modules/whozit/index.scss /Users/littlebigbot/repo/src/modules/whozit/whozit.scss /Users/littlebigbot/repo/src/modules/whatzit/whatzit-group.scss /Users/littlebigbot/repo/src/modules/whatzit/whatzit.scss /Users/littlebigbot/repo/src/modules/whatzit/restore.scss /Users/littlebigbot/repo/src/modules/outline/bullet.scss /Users/littlebigbot/repo/src/modules/profile/toolbar.scss /Users/littlebigbot/repo/src/modules/register/register.scss /Users/littlebigbot/repo/src/modules/another-thing/source-form.scss /Users/littlebigbot/repo/src/modules/another-thing/another-thing-export.scss /Users/littlebigbot/repo/src/modules/another-thing/another-thing.scss /Users/littlebigbot/repo/src/styles/base/global.scss /Users/littlebigbot/repo/src/styles/base/reset.scss /Users/littlebigbot/repo/src/styles/base/typography.scss /Users/littlebigbot/repo/src/styles/components/alert.scss /Users/littlebigbot/repo/src/styles/components/button.scss /Users/littlebigbot/repo/src/styles/components/dropdown.scss /Users/littlebigbot/repo/src/styles/components/form-group.scss /Users/littlebigbot/repo/src/styles/components/loader.scss /Users/littlebigbot/repo/src/styles/components/popover.scss /Users/littlebigbot/repo/src/styles/components/table.scss /Users/littlebigbot/repo/src/styles/fonts/fonts.scss /Users/littlebigbot/repo/src/styles/helpers/mixins.scss /Users/littlebigbot/repo/src/styles/helpers/utilities.scss /Users/littlebigbot/repo/src/styles/helpers/variables.scss /Users/littlebigbot/repo/src/styles/vendor/angular-form.scss /Users/littlebigbot/repo/src/styles/vendor/bootstrap.scss /Users/littlebigbot/repo/src/styles/vendor/bourbon.scss /Users/littlebigbot/repo/src/styles/vendor/flash-message.scss /Users/littlebigbot/repo/src/styles/vendor/font-awesome.scss /Users/littlebigbot/repo/src/utility/color-picker/color-picker.scss /Users/littlebigbot/repo/src/utility/pagination/pagination.scss --config=.scss-lint.yml --format=XML
[10:05:14] 1 issues found in /Users/littlebigbot/repo/src/styles/components/table.scss
[10:05:14] styles/components/table.scss:20 [W] QualifyingElement: Avoid qualifying attribute selectors with an element.
[10:05:14] Finished 'scss-lint' after 5.09 s
[10:07:13] Using gulpfile ~/repo/Gulpfile.js
[10:07:13] Starting 'scss-lint'...
bundle exec scss-lint /Users/littlebigbot/repo/src/main.scss /Users/littlebigbot/repo/src/modules/analytics/analytics.scss /Users/littlebigbot/repo/src/modules/application/application.scss /Users/littlebigbot/repo/src/modules/a-thing/a-thing-form.scss /Users/littlebigbot/repo/src/modules/a-thing/a-thing.scss /Users/littlebigbot/repo/src/modules/error-page/404.scss /Users/littlebigbot/repo/src/modules/error-page/500.scss /Users/littlebigbot/repo/src/modules/error-page/error-page.scss /Users/littlebigbot/repo/src/modules/landing-page/landing.scss /Users/littlebigbot/repo/src/modules/login-page/login.scss /Users/littlebigbot/repo/src/modules/menu/global-menu.scss /Users/littlebigbot/repo/src/modules/menu/menu-collapsed.scss /Users/littlebigbot/repo/src/modules/menu/menu.scss /Users/littlebigbot/repo/src/modules/modal/modal.scss /Users/littlebigbot/repo/src/modules/whozit/index.scss /Users/littlebigbot/repo/src/modules/whozit/whozit.scss /Users/littlebigbot/repo/src/modules/whatzit/whatzit-group.scss /Users/littlebigbot/repo/src/modules/whatzit/whatzit.scss /Users/littlebigbot/repo/src/modules/whatzit/restore.scss /Users/littlebigbot/repo/src/modules/outline/bullet.scss /Users/littlebigbot/repo/src/modules/profile/toolbar.scss /Users/littlebigbot/repo/src/modules/register/register.scss /Users/littlebigbot/repo/src/modules/another-thing/source-form.scss /Users/littlebigbot/repo/src/modules/another-thing/another-thing-export.scss /Users/littlebigbot/repo/src/modules/another-thing/another-thing.scss /Users/littlebigbot/repo/src/styles/base/global.scss /Users/littlebigbot/repo/src/styles/base/reset.scss /Users/littlebigbot/repo/src/styles/base/typography.scss /Users/littlebigbot/repo/src/styles/components/alert.scss /Users/littlebigbot/repo/src/styles/components/button.scss /Users/littlebigbot/repo/src/styles/components/dropdown.scss /Users/littlebigbot/repo/src/styles/components/form-group.scss /Users/littlebigbot/repo/src/styles/components/loader.scss /Users/littlebigbot/repo/src/styles/components/popover.scss /Users/littlebigbot/repo/src/styles/components/table.scss /Users/littlebigbot/repo/src/styles/fonts/fonts.scss /Users/littlebigbot/repo/src/styles/helpers/mixins.scss /Users/littlebigbot/repo/src/styles/helpers/utilities.scss /Users/littlebigbot/repo/src/styles/helpers/variables.scss /Users/littlebigbot/repo/src/styles/vendor/angular-form.scss /Users/littlebigbot/repo/src/styles/vendor/bootstrap.scss /Users/littlebigbot/repo/src/styles/vendor/bourbon.scss /Users/littlebigbot/repo/src/styles/vendor/flash-message.scss /Users/littlebigbot/repo/src/styles/vendor/font-awesome.scss /Users/littlebigbot/repo/src/utility/color-picker/color-picker.scss /Users/littlebigbot/repo/src/utility/pagination/pagination.scss --config=.scss-lint.yml --format=XML
[10:07:17] Finished 'scss-lint' after 4.15 s

(I edited the filepaths just to obfuscate the project I'm working on.)

Thanks @juanfran :)

littlebigbot avatar May 04 '15 15:05 littlebigbot

sorry I can't see the error :disappointed: It always works for me some ideas to try

  • update scss-lint gem
  • run the gulp-scss-lint verbose output in your terminal and check if it always works
  • add sync: true in your gulp-scss-lint options, it's slower but maybe works well

juanfran avatar May 05 '15 17:05 juanfran

@juanfran Which version of the gem are you using?

till avatar May 07 '15 20:05 till

0.38.0

juanfran avatar May 08 '15 21:05 juanfran