<commit_before>var _ = require('underscore');
var postcss = require('postcss');
var stripInlineComments = require('postcss-strip-inline-comments');
var SCSSsyntax = require('postcss-scss');

var OUTLINE_ATTRS = ['line-color', 'line-opacity'];

function generateCSSTreeFromCartoCSS (cartocss) {
  var cssTree = postcss()
    .use(stripInlineComments)
    .process(cartocss, { syntax: SCSSsyntax });

  return cssTree;
}

function isPropertyIncluded (cartocss, attr) {
  var cssTree = generateCSSTreeFromCartoCSS(cartocss);
  var root = cssTree.result.root;
  var propertyIncluded = false;

  if (root) {
    root.walkDecls(attr, function (node) {
      var parentNode = node.parent;

      if (!isSelectorRule(parentNode) || isMapnikGeometrySelectorRule(parentNode)) {
        propertyIncluded = true;
      }
    });
  }
<commit_msg>Getting rid of an unnecessary variable<commit_after>var _ = require('underscore');
var postcss = require('postcss');
var stripInlineComments = require('postcss-strip-inline-comments');
var SCSSsyntax = require('postcss-scss');

var OUTLINE_ATTRS = ['line-color', 'line-opacity'];

function generateCSSTreeFromCartoCSS (cartocss) {
  return postcss()
    .use(stripInlineComments)
    .process(cartocss, { syntax: SCSSsyntax });
}

function isPropertyIncluded (cartocss, attr) {
  var cssTree = generateCSSTreeFromCartoCSS(cartocss);
  var root = cssTree.result.root;
  var propertyIncluded = false;

  if (root) {
    root.walkDecls(attr, function (node) {
      var parentNode = node.parent;

      if (!isSelectorRule(parentNode) || isMapnikGeometrySelectorRule(parentNode)) {
        propertyIncluded = true;
      }
    });
  }

{'fraction_non_alphanumeric': 0.12372372372372373, 'fraction_numerical': 0.0, 'mean_word_length': 4.534883720930233, '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': '2256023', 'n_tokens_mistral': 535, 'n_tokens_neox': 526, 'n_words': 108}