<commit_before>#!/bin/bash
# This file is part of the LibreOffice project.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

# corrects include guards for hxx/h files automatically by its path.

# Usage:
# a) fixincludeguards.sh header.hxx
# b) find . -name *.hxx -or -name *.h | xargs sh fixincludeguards.sh

# TODO: This doesn't fix wrong #endif comments, like:
# #ifndef FOO_BAR_HXX
# #define FOO_BAR_HXX
# ...
# #endif // OTHER_BAR_HXX

guard_prefix="INCLUDED_"

for fn in "$@"; do
    # remove leading ./, if invoked with find
    fn=`echo "$fn" | sed 's/^.\///g'`

    # global header in include/ top level dir:
    # drop the project dir
    fnfixed=`echo $fn | sed 's/include\///g'`<commit_msg>The TODO seems to be DONE<commit_after>#!/bin/bash
# This file is part of the LibreOffice project.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

# corrects include guards for hxx/h files automatically by its path.

# Usage:
# a) fixincludeguards.sh header.hxx
# b) find . -name *.hxx -or -name *.h | xargs sh fixincludeguards.sh

guard_prefix="INCLUDED_"

for fn in "$@"; do
    # remove leading ./, if invoked with find
    fn=`echo "$fn" | sed 's/^.\///g'`

    # global header in include/ top level dir:
    # drop the project dir
    fnfixed=`echo $fn | sed 's/include\///g'`
{'fraction_non_alphanumeric': 0.12712397734424166, 'fraction_numerical': 0.005034612964128383, 'mean_word_length': 3.0874035989717226, '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': '2722964', 'n_tokens_mistral': 565, 'n_tokens_neox': 540, 'n_words': 212}