<commit_before>'use strict';

var helpers = require('../helpers'),
    os = require('os');

module.exports = {
  'name': 'single-line-per-selector',
  'defaults': {},
  'detect': function (ast, parser) {
    var result = [];

    ast.traverseByType('selector', function (selector) {
      selector.forEach('delimiter', function (del, i) {
        var next = selector.content[i + 1].content[0];

        if (next) {
          if (next.type !== 'space' || next.content.indexOf(os.EOL) === -1) {
            result = helpers.addUnique(result, {
              'ruleId': parser.rule.name,
              'line': next.start.line,
              'column': next.start.column,
              'message': 'Selectors must be placed on new lines',
              'severity': parser.severity
            });
          }
        }
      });
    });

    return result;<commit_msg>:bug: Fix Sass syntax error<commit_after>'use strict';

var helpers = require('../helpers'),
    os = require('os');

module.exports = {
  'name': 'single-line-per-selector',
  'defaults': {},
  'detect': function (ast, parser) {
    var result = [];

    ast.traverseByType('selector', function (selector) {
      selector.forEach('delimiter', function (delimiter, i) {
        var next = selector.content[i + 1];

        if (next.is('simpleSelector')) {
          next = next.content[0];
        }

        if (!(next.is('space') && next.content.indexOf(os.EOL) !== -1)) {
          result = helpers.addUnique(result, {
            'ruleId': parser.rule.name,
            'line': next.start.line,
            'column': next.start.column,
            'message': 'Selectors must be placed on new lines',
            'severity': parser.severity
          });
        }
      });
    });

    return result;
{'fraction_non_alphanumeric': 0.16921335597057158, 'fraction_numerical': 0.003395585738539898, 'mean_word_length': 2.1236749116607774, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4424532', 'n_tokens_mistral': 533, 'n_tokens_neox': 524, 'n_words': 114}