Hi,
checkstyle (see http://www.geocities.com/oburn/checkstyle/) is a
'development tool to help programmers write Java code that adheres
to a coding standard. Its purpose is to automate the process of
checking Java code, and to spare humans of this boring (but
important) task.'
Maybe some of you are interested in the attached 'jde-check.el', which
interfaces jde to checkstyle.
Best,
Markus Mohnen
--
Dr. Markus Mohnen [EMAIL PROTECTED]
Lehrstuhl f. Informatik II www-i2.informatik.rwth-aachen.de/~mohnen/
RWTH Aachen, Ahornstr. 55 Tel.: (+49/0) 241 80 21240
52056 Aachen, GERMANY Fax.: (+49/0) 241 217
;;; JDE-CHECK.EL --- Checkstyle interface for JDE
;; Copyright (C) 2001 Markus Mohnen
;; Author: Markus Mohnen [EMAIL PROTECTED]
;; Maintainer: Markus Mohnen [EMAIL PROTECTED]
;; Created: 06 Jun 2001
;; Version: 1.0
;; Keywords:
;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation; either version 1, or (at your option)
;; any later version.
;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;; A copy of the GNU General Public License can be obtained from this
;; program's author (send electronic mail to
;; [EMAIL PROTECTED]) or from the Free Software
;; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
;; LCD Archive Entry:
;; jde-check|Markus Mohnen|[EMAIL PROTECTED]
;; |Checkstyle interface for JDE
;; |$Date$|$Revision$|~/packages/jde-check.el
;;; Commentary:
;;; This package provides an interface from JDE (see
;;; http://jde.sunsite.dk/) to checkstyle (see
;;; http://www.geocities.com/oburn/checkstyle/) an `development tool
;;; to help programmers write Java code that adheres to a coding
;;; standard'.
;;; Installation:
;;
;; Put this file on your Emacs-Lisp load path and add following into your
;; ~/.emacs startup file
;;
;; (require 'jde-check)
;;; Usage:
;;
;; M-x `jde-check' to check the java file in the current buffer.
;;
;;; Customization:
;;
;; M-x `jde-check-customize' to customize all the jpack options.
;;; Code:
(require 'jde-compile)
(require 'jde-run)
(defconst jde-check-version 1.0)
(defgroup jde-check nil
JDE Checker Options
:group 'jde
:prefix jde-check-option-)
(defcustom jde-checker-class com.puppycrawl.tools.checkstyle.Main
*Java checker class.
Specifies the class of the the program to be used to check the source
in the current buffer. The default is the checkstyle program.
:group 'jde-check
:type 'string)
(defcustom jde-checker-classpath nil
*Specify paths of classes required to run the jde-checker application.
The JDE uses the specified paths to construct a -classpath
argument to pass to the Java interpreter. This option overrides the
`jde-global-classpath' option.
:group 'jde-check
:type '(repeat (file :tag Path)))
(defcustom jde-read-check-args nil
*Specify whether to prompt for additional checker arguments.
If this variable is non-nil, the jde-check command prompts
you to enter additional checker arguments in the minibuffer.
These arguments are appended to those specified by customization
variables. The JDE maintains a history list of arguments
entered in the minibuffer.
:group 'jde-check
:type 'boolean)
(defvar jde-interactive-check-args
String of checker arguments entered in the minibuffer.)
(defvar jde-interactive-compile-arg-history nil
History of checker arguments entered in the minibuffer.)
(defcustom jde-check-option-command-line-args
*Specify options as a string of command-line arguments.
The value of this variable should be a string of switches understood
by the checker. This variable is intended to be used to set check
options not otherwise defined by the JDE, in particular, options
not defined by checkstyle but used by another checker that you might
want to use with the JDE.
:group 'jde-check
:type 'string)
(defcustom jde-check-option-allow-tabs nil
*Indicates whether to allow tabs.
:group 'jde-check
:type 'boolean)
(defcustom jde-check-option-allow-protected nil
*Indicates whether to allow protected data.
:group 'jde-check
:type 'boolean)
(defcustom jde-check-option-allow-noauthor nil
*Indicates whether to allow no @author tag to be defined for class and interface
Javadoc comments.
:group 'jde-check
:type 'boolean)
(defcustom jde-check-option-allow-maxlinelen 80
*Specifies the maximum line length.
:group 'jde-check
:type 'integer)
(defcustom jde-check-option-pattern-member
*Specifies the regular expression to match against member variables.
If empty, use checkstyle defaults.
:group 'jde-check
:type 'string)
(defcustom jde-check-option-pattern-parameter
*Specifies the regular expression to match against