CP_REPORTER(1)

πŸ“¦ version 0.10, in opensuse-leap 16.0

πŸ’… CP_reporter / CP_REPORTER(1) πŸ’…

Okay so bestie, this is the manual page for CP_reporter β€” the header calls it CP_REPORTER(1), and we’re folding that name right up here at the top like a little name tag 🫢. This tool is lowkey a copy-paste detective, and honestly? It’s giving "I see what you duplicated there" energy 😭.

🌸 SYNOPSIS 🌸

CP_reporter [options] path1 path2 ...

🫢 DESCRIPTION 🫢

CP_reporter reads the specified files and analyses the content for repeated substrings as they might occur when copying and pasting code. Bestie, it is literally hunting for the "wait, haven't I seen this exact chunk before?" moments πŸ‘€.

When a duplication is found, the position and range is reported for each copy found, and the duplicated content is printed once. The findings are sorted by length in bytes. No cap.

The arguments are paths which can be directory paths or file paths or glob expressions. All three, bestie β€” directory paths, file paths, and glob expressions πŸ’–.

✨ OPTIONS ✨

  • --minimum AMOUNT β€” sets the minimum extent a duplication should have to be reported. Default is set to 5 lines. Two units are supported: positive numbers indicate lines while negative numbers specify bytes. So line-count girlies use positives, and byte-gremlins use negatives πŸ¦‹.
  • --dir DIR β€” specifies the directory that is scanned recursively for files. Default is set to lib.
  • --ignore PATTERN β€” suppress the report of all duplications that match the ignore filter. No default, may be given multiple times. For example, /\A(^#.+$)+\z/ would suppress a duplication when all lines of it begin with a comment. Obsessed with a filter that knows a comment block when it sees one πŸ’….
  • --terse β€” suppress the output of the content of a duplication. Only positions of duplications are printed out. Short, sweet, no duplicated-content reveal πŸŽ€.

πŸ’€ BUGS & LIMITATIONS πŸ’€

  • No rc file yet. 😭
  • Limited to 8-bit characters yet.
  • No text preprocessing yet ( e.g. whitespace shrinking or comments elimination)
  • No real parsing of Perl code yet.

🌈 ACKNOWLEDGEMENTS 🌈

This program was inspired a bit by Ovids find_duplicate_code.pl. Cute πŸ’œ.


Okay bye bestie 🫢 sign-off: this page’s footer says source/version perl v5.42.0, date 2019-05-13, and manual name CP_REPORTER(1). Periodt πŸ’–βœ¨

πŸ“¦ where this page comes from