diff --git a/AUTHORS.rst b/AUTHORS.rst index 9a8224dc7da..a6d6b904706 100644 --- a/AUTHORS.rst +++ b/AUTHORS.rst @@ -95,6 +95,7 @@ The following organizations or individuals have contributed to ScanCode: - Thorsten Harter @ThorstenHarter - Till Jaeger @LeChasseur - Tobias Furuholm @furuholm +- Topu Kumar Mondol @topukumar538 - Tushar Goel @TG1999 - Tushar Mittal @techytushar - Tushar Upadhyay @tushar912 diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 0bc400407d3..d66cedc22f3 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -16,6 +16,8 @@ Next release have cached results for those already. If we do, we update our results with the cached data. If not, we add those scanners to a list of scanners to be run. After scanning, the cache is updated. +- Improve author detection for dotted names such as ``Frankie.Chu``. + https://github.com/aboutcode-org/scancode-toolkit/issues/4229 v33.0.0rc1 - 2026-05-14 ------------------------ diff --git a/src/cluecode/copyrights.py b/src/cluecode/copyrights.py index 29876084168..7272871abb0 100644 --- a/src/cluecode/copyrights.py +++ b/src/cluecode/copyrights.py @@ -2042,6 +2042,8 @@ def build_detection_from_node( ############################################################################ # "authors" or "contributors" is interesting, and so a tag of its own + # Author:Frankie.Chu + (r'^[Aa]uthor:[A-Z][a-z]+\.[A-Z][a-z]+,?$', 'AUTH-DOTTED'), (r'^[Aa]uthors,$', 'AUTHDOT'), (r'^[Aa]uthor$', 'AUTH'), (r'^[Aa]uthor\.$', 'AUTHDOT'), @@ -3527,6 +3529,9 @@ def build_detection_from_node( # Author not attributable AUTHOR: { } #not attributable + # Author:Frankie.Chu + AUTHOR: {} + # author (Panagiotis Tsirigotis) AUTHOR: { +} #author Foo Bar @@ -3675,6 +3680,8 @@ def refine_author(a): """ if not a: return + + a = re.sub(r'^[Aa]uthor:\s*', '', a) # FIXME: we could consider to split comma separated lists such as # gthomas, sorin@netappi.com, andrew.lunn@ascom.che.g. a = remove_some_extra_words_and_punct(a) diff --git a/tests/cluecode/data/authors/author_frankie_chu.cpp b/tests/cluecode/data/authors/author_frankie_chu.cpp new file mode 100644 index 00000000000..5bb8b7afb34 --- /dev/null +++ b/tests/cluecode/data/authors/author_frankie_chu.cpp @@ -0,0 +1,2 @@ +// Date:9 April,2012 +// Author:Frankie.Chu diff --git a/tests/cluecode/data/authors/author_frankie_chu.cpp.yml b/tests/cluecode/data/authors/author_frankie_chu.cpp.yml new file mode 100644 index 00000000000..c9585400317 --- /dev/null +++ b/tests/cluecode/data/authors/author_frankie_chu.cpp.yml @@ -0,0 +1,8 @@ +what: + - authors + - authors_summary +authors: + - Frankie.Chu +authors_summary: + - value: Frankie.Chu + count: 1