bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#69402: 28.3; checkdoc does not check for docstrings wider than 80 ch


From: Tim Landscheidt
Subject: bug#69402: 28.3; checkdoc does not check for docstrings wider than 80 characters
Date: Mon, 26 Feb 2024 08:12:17 +0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.3 (gnu/linux)

(I am not sure whether this is a bug or a missing feature;
the reference to byte-compile-docstring-max-column in
lisp/emacs-lisp/checkdoc.el made me assume this should
work.)

With Emacs 28.3 and a test-checkdoc.el:

| ;;; test-checkdoc.el --- Tests

| ;;; Commentary:
| ;;

| ;;; Code:

| (defcustom my-test-configuration
|   nil
|   "This docstring is longer than 
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
 characters."
|   :group 'does-not-matter
|   :type 'string)

| (defvar my-test-variable
|   nil
|   "This docstring is longer than 
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
 characters.")

| (defun my-test-function
|   nil
|   "This docstring is longer than 
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
 characters.")

| (provide 'test-checkdoc)

| ;;; test-checkdoc.el ends here

M-x checkdoc RET reports:

| Buffer comments and tags:  Ok
| Documentation style:       Ok
| Message/Query text style:  Ok
| Unwanted Spaces:           Ok

However, byte-compile-file complains:

| ^L
| Compiling file /tmp/test-checkdoc.el at Mon Feb 26 08:10:04 2024
| test-checkdoc.el:8:1: Warning: custom-declare-variable `my-test-configuration'
|     docstring wider than 80 characters
| test-checkdoc.el:14:1: Warning: defvar `my-test-variable' docstring wider than
|     80 characters

| In my-test-function:
| test-checkdoc.el:18:8: Warning: docstring wider than 80 characters

IMHO, checkdoc should check that docstrings are no longer
than 80 (or byte-compile-docstring-max-column) characters.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]