Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't reformat indent-style comments #1441

Conversation

0x6675636b796f75676974687562
Copy link
Member

What's done:

Examples

openssl/openssl/test/testutil.h:23:

/*-
 * Simple unit tests should implement setup_tests().
 * This function should return zero if the registration process fails.
 * To register tests, call ADD_TEST or ADD_ALL_TESTS:
 *
 * int setup_tests(void)
 * {
 *     ADD_TEST(test_foo);
 *     ADD_ALL_TESTS(test_bar, num_test_bar);
 *     return 1;
 * }
 *
 * Tests that require clean up after execution should implement:
 *
 * void cleanup_tests(void);
 *
 * The cleanup_tests function will be called even if setup_tests()
 * returns failure.
 *
 * In some cases, early initialization before the framework is set up
 * may be needed.  In such a case, this should be implemented:
 *
 * int global_init(void);
 *
 * This function should return zero if there is an unrecoverable error and
 * non-zero if the initialization was successful.
 */

openssl/openssl/test/verify_extra_test.c:32:

/*-
 * Test for CVE-2015-1793 (Alternate Chains Certificate Forgery)
 *
 * Chain is as follows:
 *
 * rootCA (self-signed)
 *   |
 * interCA
 *   |
 * subinterCA       subinterCA (self-signed)
 *   |                   |
 * leaf ------------------
 *   |
 * bad
 *
 * rootCA, interCA, subinterCA, subinterCA (ss) all have CA=TRUE
 * leaf and bad have CA=FALSE
 *
 * subinterCA and subinterCA (ss) have the same subject name and keys
 *
 * interCA (but not rootCA) and subinterCA (ss) are in the trusted store
 * (roots.pem)
 * leaf and subinterCA are in the untrusted list (untrusted.pem)
 * bad is the certificate being verified (bad.pem)
 *
 * Versions vulnerable to CVE-2015-1793 will fail to detect that leaf has
 * CA=FALSE, and will therefore incorrectly verify bad
 *
 */

freebsd/freebsd-src/sys/sys/cdefs.h:634:

/*-
 * The following definitions are an extension of the behavior originally
 * implemented in <sys/_posix.h>, but with a different level of granularity.
 * POSIX.1 requires that the macros we test be defined before any standard
 * header file is included.
 *
 * Here's a quick run-down of the versions:
 *  defined(_POSIX_SOURCE)		1003.1-1988
 *  _POSIX_C_SOURCE == 1		1003.1-1990
 *  _POSIX_C_SOURCE == 2		1003.2-1992 C Language Binding Option
 *  _POSIX_C_SOURCE == 199309		1003.1b-1993
 *  _POSIX_C_SOURCE == 199506		1003.1c-1995, 1003.1i-1995,
 *					and the omnibus ISO/IEC 9945-1: 1996
 *  _POSIX_C_SOURCE == 200112		1003.1-2001
 *  _POSIX_C_SOURCE == 200809		1003.1-2008
 *
 * In addition, the X/Open Portability Guide, which is now the Single UNIX
 * Specification, defines a feature-test macro which indicates the version of
 * that specification, and which subsumes _POSIX_C_SOURCE.
 *
 * Our macros begin with two underscores to avoid namespace screwage.
 */

Actions checklist

  • Added tests on checks
  • Added tests on fixers

### What's done:

 * indent-style comments (those starting with `/*-`) are no longer reformatted.
@codecov
Copy link

codecov bot commented Jul 12, 2022

Codecov Report

Merging #1441 (69961c7) into master (8200636) will decrease coverage by 0.01%.
The diff coverage is 80.00%.

@@             Coverage Diff              @@
##             master    #1441      +/-   ##
============================================
- Coverage     83.19%   83.18%   -0.02%     
- Complexity     2555     2558       +3     
============================================
  Files           107      107              
  Lines          7612     7617       +5     
  Branches       2103     2104       +1     
============================================
+ Hits           6333     6336       +3     
- Misses          388      389       +1     
- Partials        891      892       +1     
Flag Coverage Δ
unittests 83.18% <80.00%> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
.../ruleset/rules/chapter2/kdoc/CommentsFormatting.kt 73.73% <80.00%> (-0.36%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8200636...69961c7. Read the comment docs.

@github-actions
Copy link
Contributor

JUnit Tests (macOS, EnricoMi/publish-unit-test-result-action@v1)

1 278 tests   1 263 ✔️  1m 16s ⏱️
   157 suites       15 💤
   157 files           0

Results for commit 69961c7.

@github-actions
Copy link
Contributor

JUnit Tests (Windows, EnricoMi/publish-unit-test-result-action@v1)

1 278 tests   1 263 ✔️  1m 6s ⏱️
   157 suites       15 💤
   157 files           0

Results for commit 69961c7.

@0x6675636b796f75676974687562 0x6675636b796f75676974687562 added this to the 1.2.2 milestone Jul 12, 2022
Copy link
Member

@petertrr petertrr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we mention this in the docs?

@0x6675636b796f75676974687562 0x6675636b796f75676974687562 deleted the bugfix/andrey.shcheglov/indent-style-comments branch July 12, 2022 12:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants