<commit_before>funcs:
  - name: isValid
    type: asserter
    body: |
      function(text, name) {
        text = text.substring(2).trim()
        var words = text.split(" ")
        return words[0].toLowerCase() !== name.toLowerCase()
      }
tenets:
  - name: comment-first-word-as-subject
    flows:
      codelingo/docs:
        title: Comment First Word as Subject
        body: |
          Doc comments work best as complete sentences, which allow a wide variety of automated presentations. 
          The first sentence should be a one-sentence summary that starts with the name being declared.
      codelingo/review:
        comment: |
          The first sentence should be a one-sentence summary that starts with the name ({{funcName}}) being declared.
    query: |
      import codelingo/ast/go

      go.file(depth = any):
        go.decls:
          go.func_decl:
            go.comment_group:
              @review comment
              go.comment:
                sibling_order == 0
                text as commText
            go.ident:
              name as funcName
              isValid(commText, funcName)<commit_msg>Removed some unneeded facts<commit_after>funcs:
  - name: isValid
    type: asserter
    body: |
      function(text, name) {
        text = text.substring(2).trim()
        var words = text.split(" ")
        return words[0].toLowerCase() !== name.toLowerCase()
      }
tenets:
  - name: comment-first-word-as-subject
    flows:
      codelingo/docs:
        title: Comment First Word as Subject
        body: |
          Doc comments work best as complete sentences, which allow a wide variety of automated presentations. 
          The first sentence should be a one-sentence summary that starts with the name being declared.
      codelingo/review:
        comment: |
          The first sentence should be a one-sentence summary that starts with the name ({{funcName}}) being declared.
    query: |
      import codelingo/ast/go

      go.func_decl(depth = any):
        go.comment_group:
          @review comment
          go.comment:
            sibling_order == 0
            text as commText
        go.ident:
          name as funcName
          isValid(commText, funcName)
{'fraction_non_alphanumeric': 0.08097165991902834, 'fraction_numerical': 0.002699055330634278, 'mean_word_length': 1.9417989417989419, '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': '4557688', 'n_tokens_mistral': 598, 'n_tokens_neox': 593, 'n_words': 196}