RE: JDE and Checkstyle

2002-11-14 Thread Henrik Kjær
Thank you for the quick reply - respect!
The solution worked just fine :-)


MVH

Henrik Kjær


-Original Message-
From: Paul Kinnucan [mailto:paulk;mathworks.com] 
Sent: 13. november 2002 21:08
To: Henrik Kjær
Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: JDE and Checkstyle


Henrik Kjær writes:
  Hello Paul
   
   
  First, let me congratulate you with a great new JDE package.
  I have previously posted the mailing list, but never
  got any answer, then I tried to post the following to mohnen but still haven't got 
 an answer,   so now I try you.   Please let me know if I am the only one with the 
 following problem with   Checkstyle in JDE (I do not have the problem using 
 checkstyle as an   ant target!?)
  I have problems editing the TODO pattern.
  I have changed it to the sun convention FIXME using the M-x 
 jde-checkstyle-customize, but it still finds TODO:, and only those!?   I have 
 previously send a mail to the jde forum, but never got any replies, hence I   try 
 the source. 
  Question: Can you change the TODO pattern to FIXME using the customizations and   
 then have jde-checkstyle report warnings. Or is it just me :-) !? 
   
  I am using emacs 21.1, jde 2.2.9, on windows 2000.
   
  Sincerly 
   

This is a bug in jde-checkstyle.el. To fix the bug, replace line 546 with the 
following,

(add-to-list 'options (concat -Dcheckstyle.pattern.todo= 
jde-checkstyle-option-todo-format)))

recompile, and restart Emacs.

- Paul




JDE and Checkstyle

2002-11-13 Thread Paul Kinnucan
Henrik Kjær writes:
  Hello Paul
   
   
  First, let me congratulate you with a great new JDE package.
   
  I have previously posted the mailing list, but never
  got any answer, then I tried to post the following to mohnen but still haven't got 
 an answer,
  so now I try you.
  Please let me know if I am the only one with the following problem with
  Checkstyle in JDE (I do not have the problem using checkstyle as an
  ant target!?)
   
  I have problems editing the TODO pattern.
  I have changed it to the sun convention FIXME using the M-x 
 jde-checkstyle-customize, but it still finds TODO:, and only those!?
  I have previously send a mail to the jde forum, but never got any replies, hence I
  try the source. 
  Question: Can you change the TODO pattern to FIXME using the customizations and
  then have jde-checkstyle report warnings. Or is it just me :-) !? 
   
  I am using emacs 21.1, jde 2.2.9, on windows 2000.
   
  Sincerly 
   

This is a bug in jde-checkstyle.el. To fix the bug, replace line 546 with the 
following,

(add-to-list 'options (concat -Dcheckstyle.pattern.todo= 
jde-checkstyle-option-todo-format)))

recompile, and restart Emacs.

- Paul




JDE and Checkstyle

2001-06-07 Thread Markus Mohnen

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