JP2007200125A - Coding agreement selection program - Google Patents

Coding agreement selection program Download PDF

Info

Publication number
JP2007200125A
JP2007200125A JP2006019390A JP2006019390A JP2007200125A JP 2007200125 A JP2007200125 A JP 2007200125A JP 2006019390 A JP2006019390 A JP 2006019390A JP 2006019390 A JP2006019390 A JP 2006019390A JP 2007200125 A JP2007200125 A JP 2007200125A
Authority
JP
Japan
Prior art keywords
application
type
project
determination procedure
file
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2006019390A
Other languages
Japanese (ja)
Other versions
JP4983027B2 (en
Inventor
Eiji Morito
英治 森戸
Hiroyuki Inaba
博之 稲葉
Susumu Sato
将 佐藤
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP2006019390A priority Critical patent/JP4983027B2/en
Publication of JP2007200125A publication Critical patent/JP2007200125A/en
Application granted granted Critical
Publication of JP4983027B2 publication Critical patent/JP4983027B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To provide a coding protocol selection program capable of properly selecting a coding protocol applied to a source code of an application. <P>SOLUTION: This coding protocol selection program makes a computer execute: a file configuration decision procedure for deciding the kind of the application on the basis of a file configuration of a project defined as development environment of the application; a project kind decision procedure (S201) for deciding the kind of the application on the basis of the kind of the project; and an application protocol decision means deciding the coding protocol applied to the source code of the application on the basis of a protocol correspondence information defined with the coding protocol applied to the source code of the application according to the kind of the application, and the kind of the application specified by at least one decision result in the file configuration decision procedure and the project kind decision procedure. <P>COPYRIGHT: (C)2007,JPO&INPIT

Description

本発明は、コーディング規約選択プログラムに関し、特にアプリケーションの開発環境において作成されたソースコードに適用するコーディング規約を判定するコーディング規約選択プログラムに関する。   The present invention relates to a coding rule selection program, and more particularly to a coding rule selection program for determining a coding rule to be applied to source code created in an application development environment.

プログラムを開発する際に、開発プロジェクト内等においてコーディング規約が定められることが多い。各開発者がコーディング規約に沿ったコーディングを行うことにより、全体的に統一感のあるソースコードが作成され、プログラムの保守性の向上が期待される。但し、単にコーディング規約を定めただけでは、当該規約に沿って各ソースコードが作成されていることは保証されない。そこで、従来、ソースコードがコーディング規約に従っているかをチェックするためのソフトウェアが提供されている。   When developing a program, coding conventions are often defined within a development project. As each developer performs coding in accordance with the coding standards, a uniform source code is created as a whole, and improvement of program maintainability is expected. However, simply defining coding rules does not guarantee that each source code is created according to the rules. Therefore, conventionally, software for checking whether the source code conforms to the coding standard has been provided.

他方において、近年では、インターネット等の発展に応じて、例えば、クライアントアプリケーション、ライブラリ、アプレット、Webサービス、Webアプリケーション、及びEJB(登録商標)(Enterprise JavaBeans(登録商標))等、アプリケーションの種別も豊富なものとなっている。このようなアプリケーションの種別に応じてコーディング上の制約が異なる場合がある。かかる点に鑑みればコーディング規約はアプリケーションの種別に応じて定められ、チェックされることが望ましい。
特開平08−101771号公報
On the other hand, in recent years, the types of applications such as client applications, libraries, applets, Web services, Web applications, and EJB (registered trademark) (Enterprise JavaBeans (registered trademark)) are abundant in accordance with the development of the Internet and the like. It has become a thing. Coding restrictions may differ depending on the type of application. In view of this point, it is desirable that the coding rules are determined and checked according to the type of application.
Japanese Patent Laid-Open No. 08-101771

しかしながら、従来、コーディング規約をチェックするソフトウェアは、ソフトウェアの開発環境を提供するソフトウェア(コーディング、コンパイル、及びリンク等の支援を行うソフトウェア)とは別個の製品として存在しているものが多かった。その場合、開発環境において記述されたソースコードについてコーディング規約のチェックを行うためには、当該開発環境とは別に改めてコーディング規約のチェックソフトを起動し、当該チェックソフトにソースコードの格納場所やアプリケーションの種別等の情報をユーザが入力する必要があった。   However, conventionally, software that checks coding standards has often existed as a separate product from software that provides a software development environment (software that supports coding, compilation, linking, and the like). In that case, in order to check the coding conventions for the source code described in the development environment, the coding convention check software is started separately from the development environment, and the source code storage location and application The user has to input information such as type.

また、一部のチェックソフトでは、開発環境から呼び出されて自動的に起動するものもあるが、開発環境からはソースコード等の格納場所が受け渡されるだけで、アプリケーションの種別については、ユーザが判断しなければならなかった。   In addition, some check software is called from the development environment and automatically starts, but the development environment simply passes the storage location of the source code, etc. I had to judge.

本発明は、上記の点に鑑みてなされたものであって、アプリケーションのソースコードに適用するコーディング規約を適切に選択することのできるコーディング規約選択プログラムの提供を目的とする。   The present invention has been made in view of the above points, and an object thereof is to provide a coding rule selection program capable of appropriately selecting a coding rule to be applied to an application source code.

そこで上記課題を解決するため、本発明は、コンピュータに、アプリケーションの開発環境として定義されたプロジェクトのファイル構成に基づいて前記アプリケーションの種別を判定するファイル構成判定手順と、前記プロジェクトの種別に基づいて当該アプリケーションの種別を判定するプロジェクト種別判定手順と、前記アプリケーションの種別に応じて前記アプリケーションのソースコードに適用されるコーディング規約が定義された規約対応情報と、前記ファイル構成判定手順及び前記プロジェクト種別判定手順における少なくともいずれか一つの判定結果によって特定されるアプリケーションの種別とに基づいて、当該アプリケーションのソースコードに適用されるコーディング規約を判定する適用規約判定手順とを実行させることを特徴とする。   In order to solve the above problems, the present invention provides a computer based on a file configuration determination procedure for determining the type of the application based on the file configuration of the project defined as an application development environment, and on the type of the project. A project type determination procedure for determining the type of the application; a rule correspondence information in which a coding rule applied to the source code of the application is defined according to the application type; the file configuration determination procedure; and the project type determination. Based on at least one of the determination results in the procedure, the application rule determination procedure for determining the coding rule applied to the source code of the application is executed. And wherein the door.

このようなコーディング規約選択プログラムでは、アプリケーションのソースコードに適用するコーディング規約を適切に選択することができる。   In such a coding rule selection program, it is possible to appropriately select a coding rule to be applied to the application source code.

本発明によれば、アプリケーションのソースコードに適用するコーディング規約を適切に選択することのできるコーディング規約選択プログラムを提供することができる。   ADVANTAGE OF THE INVENTION According to this invention, the coding rule selection program which can select appropriately the coding rule applied to the source code of an application can be provided.

以下、図面に基づいて本発明の実施の形態を説明する。図1は、本発明の実施の形態におけるソフトウェア開発支援装置のハードウェア構成例を示す図である。   Hereinafter, embodiments of the present invention will be described with reference to the drawings. FIG. 1 is a diagram illustrating a hardware configuration example of a software development support apparatus according to an embodiment of the present invention.

図1のソフトウェア開発支援装置10は、それぞれバスBで相互に接続されているドライブ装置100と、補助記憶装置102と、メモリ装置103と、演算処理装置104と、表示装置105と、入力装置106と等を有するように構成される。   The software development support device 10 of FIG. 1 includes a drive device 100, an auxiliary storage device 102, a memory device 103, an arithmetic processing device 104, a display device 105, and an input device 106 that are mutually connected by a bus B. And so on.

ソフトウェア開発支援装置10での処理を実現するプログラムは、CD―ROM等の記録媒体101によって提供される。プログラムを記録した記録媒体101がドライブ装置100にセットされると、プログラムが記録媒体101からドライブ装置100を介して補助記憶装置102にインストールされる。補助記憶装置102は、インストールされたプログラムを格納すると共に、プログラムの処理に必要な各種のデータを格納する。   A program for realizing processing in the software development support apparatus 10 is provided by a recording medium 101 such as a CD-ROM. When the recording medium 101 on which the program is recorded is set in the drive device 100, the program is installed from the recording medium 101 to the auxiliary storage device 102 via the drive device 100. The auxiliary storage device 102 stores the installed program and various data necessary for processing the program.

メモリ装置103は、プログラムの起動指示があった場合に、補助記憶装置102からプログラムを読み出して格納する。演算処理装置104は、メモリ装置103に格納されたプログラムに従ってソフトウェア開発支援装置10に係る機能を実行する。表示装置105はプログラムによるGUI(Graphical User Interface)等を表示する。入力装置106はキーボード及びマウス等で構成され、様々な操作指示を入力させるために用いられる。   The memory device 103 reads the program from the auxiliary storage device 102 and stores it when there is an instruction to start the program. The arithmetic processing device 104 executes functions related to the software development support device 10 in accordance with a program stored in the memory device 103. The display device 105 displays a GUI (Graphical User Interface) or the like by a program. The input device 106 includes a keyboard and a mouse, and is used for inputting various operation instructions.

図2は、本発明の実施の形態におけるソフトウェア開発支援装置の機能構成例を示す図である。   FIG. 2 is a diagram illustrating a functional configuration example of the software development support apparatus according to the embodiment of the present invention.

図2において、ソフトウェア開発支援装置10は、開発環境提供部11と、各種のビルドツール12等とを有する。   In FIG. 2, the software development support apparatus 10 includes a development environment providing unit 11 and various build tools 12.

開発環境提供部11は、アプリケーションの開発環境を提供するためのソフトウェアである。例えば、開発環境提供部11は、ユーザフレンドリなGUIによって、アプリケーションの設計、コーディング、デバッグ、及びテスト等を支援するための統合的な環境を提供する。開発環境提供部11は、作成するアプリケーションの開発環境を「プロジェクト」という単位で管理する。ユーザは、アプリケーションを作成する際、開発環境提供部11を用いて当該アプリケーションの開発環境としてのプロジェクトを定義し、そのプロジェクトにおいてソースコード等の編集を行う。本実施の形態では、プロジェクトにおいて作成される、アプリケーションのビルドに必要な情報をプロジェクト資産111という。   The development environment providing unit 11 is software for providing an application development environment. For example, the development environment providing unit 11 provides an integrated environment for supporting application design, coding, debugging, testing, and the like by a user-friendly GUI. The development environment providing unit 11 manages the development environment of the application to be created in units of “projects”. When creating an application, the user defines a project as a development environment of the application using the development environment providing unit 11 and edits the source code and the like in the project. In the present embodiment, information necessary for building an application created in a project is referred to as a project asset 111.

プロジェクト資産111には、例えば、ソースファイルや各種の定義ファイル(例えば、ファイルの対応関係が定義されたファイルや、メイクファイル等)が含まれる。なお、ビルドとは、プロジェクト資産111に基づいてアプリケーションの実行コードを生成することをいい、一般的にはコンパイル及びリンク等の過程を含む処理をいう。   The project asset 111 includes, for example, a source file and various definition files (for example, a file in which a correspondence relationship between files is defined, a make file, etc.). The build refers to generating an execution code of an application based on the project asset 111, and generally refers to processing including processes such as compiling and linking.

ビルドツール12は、プロジェクト資産111に基づいてアプリケーションをビルドするためのコンパイラ等のツール(プログラム)である。本実施の形態では、ビルドツールの一つとして、規約チェックツール12cが含まれている。規約チェックツール12cは、アプリケーションのソースコードが、予め定められたコーディング規約(又は「コーディング規則」ともいう。)に従っているか否かをチェックするためのツールである。   The build tool 12 is a tool (program) such as a compiler for building an application based on the project asset 111. In the present embodiment, a rule check tool 12c is included as one of the build tools. The rule check tool 12c is a tool for checking whether or not the source code of the application conforms to a predetermined coding rule (also referred to as “coding rule”).

図3は、本発明の実施の形態における規約チェックツールの機能構成例を示す図である。図3において、規約チェックツール12cは、主に、規約選択部121と規約チェック部122とから構成される。   FIG. 3 is a diagram illustrating a functional configuration example of the convention check tool according to the embodiment of the present invention. In FIG. 3, the rule check tool 12 c is mainly composed of a rule selection unit 121 and a rule check unit 122.

規約選択部121は、プロジェクト資産111に基づいて、当該プロジェクトにおいて対象となっているアプリケーションの種別(アプリケーション種別)を判定し、そのアプリケーション種別に応じたコーディング規約を選択する。規約選択部121は、ソースファイル抽出部1211、アプリケーション種別判定部1212、適用規約判定部1213、規約対応情報管理テーブル1214、及びチェック対象出力部1215等より構成される。   Based on the project asset 111, the contract selection unit 121 determines the type of application (application type) targeted in the project, and selects a coding contract corresponding to the application type. The rule selection unit 121 includes a source file extraction unit 1211, an application type determination unit 1212, an application rule determination unit 1213, a rule correspondence information management table 1214, a check target output unit 1215, and the like.

ソースファイル抽出部1211は、コーディング規約のチェック対象とされるソースコードが格納されたソースファイル1110の一覧をプロジェクト資産111より抽出する。アプリケーション種別判定部1212は、プロジェクト資産111を検査して、そのプロジェクトにおいて対象となっているアプリケーションのアプリケーション種別を判定する。   The source file extraction unit 1211 extracts from the project asset 111 a list of source files 1110 in which source codes to be checked for coding rules are stored. The application type determination unit 1212 inspects the project asset 111 and determines the application type of the application targeted in the project.

適用規約判定部1213は、アプリケーション種別判定部1212によって判定されたアプリケーション種別と規約対応情報管理テーブル1214とに基づいて、当該アプリケーション種別に対応するコーディング規約1210を選択する。規約対応情報管理テーブル1214は、アプリケーション種別とコーディング規約との対応関係が管理されているテーブルであり、アプリケーション種別ごとに適用されるコーディング規約が定義されている。したがって、適用規約判定部1213は、アプリケーション種別をキーとして規約対応情報管理テーブル1214を検索することで、ソースファイル1110に適用するコーディング規約1210を判定する。   The application rule determination unit 1213 selects a coding rule 1210 corresponding to the application type based on the application type determined by the application type determination unit 1212 and the rule correspondence information management table 1214. The rule correspondence information management table 1214 is a table in which the correspondence between application types and coding rules is managed, and coding rules to be applied for each application type are defined. Therefore, the application rule determination unit 1213 determines the coding rule 1210 to be applied to the source file 1110 by searching the rule correspondence information management table 1214 using the application type as a key.

チェック対象出力部1215は、ソースファイル抽出部1211又は適用規約判定部1213から抽出されたソースファイル1110の一覧とコーディング規約1210とを規約チェック部122に出力する。   The check target output unit 1215 outputs the list of source files 1110 extracted from the source file extraction unit 1211 or the application rule determination unit 1213 and the coding rule 1210 to the rule check unit 122.

規約チェック部122は、ソースファイル1110に格納されているソースコードが、コーディング規約1210に従っているか否かをチェックする。なお、規約チェック部122によるチェック処理は、所定のものに限定されず、周知のものを用いればよい。したがって、コーディング規約1210の記述形式についても、所定のものに限定されない。   The rule checking unit 122 checks whether the source code stored in the source file 1110 conforms to the coding rule 1210. Note that the checking process by the rule checking unit 122 is not limited to a predetermined one, and a known one may be used. Therefore, the description format of the coding convention 1210 is not limited to a predetermined one.

次に、アプリケーション種別判定部1212の詳細について説明する。図4は、アプリケーション種別判定部の機能構成例を示す図である。図4において、アプリケーション種別判定部1212は、プロジェクト種別判定部1212a、構成ファイル判定部1212b、構成ファイル内容判定部1212c、ビルドツール判定部1212d、及びアプリケーション種別特定部1212e等より構成される。   Next, details of the application type determination unit 1212 will be described. FIG. 4 is a diagram illustrating a functional configuration example of the application type determination unit. 4, the application type determination unit 1212 includes a project type determination unit 1212a, a configuration file determination unit 1212b, a configuration file content determination unit 1212c, a build tool determination unit 1212d, and an application type specification unit 1212e.

また、図4に示されるように、プロジェクト資産111は、その一部としてプロジェクト情報テーブル1111を含む。プロジェクト情報テーブル1111は、プロジェクト種別1111a、構成ファイル情報1111b、及びビルドツール情報1111c等の情報を保持するテーブルである。プロジェクト種別1111aは、そのプロジェクトが対象とするアプリケーション種別等に応じて分類されるプロジェクトの種別であり、プロジェクトの作成時にどのようなアプリケーションを作成する予定であるかを示す情報に基づいて自動的に選択される。構成ファイル情報1111bは、当該プロジェクトを構成するファイルの情報である。ビルドツール情報1111cは、当該プロジェクトのビルド方法等に関する情報をいい、ビルドの各工程で利用されるビルドツール12を識別するための情報を例えばテーブル形式によって保持している。   As shown in FIG. 4, the project asset 111 includes a project information table 1111 as a part thereof. The project information table 1111 is a table that holds information such as the project type 1111a, configuration file information 1111b, and build tool information 1111c. The project type 1111a is a type of project classified according to the application type targeted by the project, and is automatically based on information indicating what kind of application is scheduled to be created when the project is created. Selected. The configuration file information 1111b is information on files that constitute the project. The build tool information 1111c refers to information related to the build method of the project, and holds information for identifying the build tool 12 used in each build process, for example, in a table format.

アプリケーション種別判定部1212は、このように構成されるプロジェクト資産111に基づいて当該プロジェクトのアプリケーション種別を判定する。すなわち、プロジェクト種別判定部1212aは、プロジェクト情報テーブル1111のプロジェクト種別に基づいてアプリケーション種別を判定する。構成ファイル判定部1212bは、当該プロジェクトのファイル構成に基づいてアプリケーション種別を判定する。構成ファイル内容判定部1212cは、構成ファイルの一部であるソースファイルの内容を解析することによりアプリケーション種別を判定する。ビルドツール判定部1212dは、当該プロジェクトが用いるビルドツールに基づいてアプリケーション種別を判定する。また、アプリケーション種別特定部1212eは、プロジェクト種別判定部1212a、構成ファイル判定部1212b、構成ファイル内容判定部1212c及びビルドツール判定部1212d等の判定結果に基づいて、アプリケーション種別を特定する。アプリケーション種別特定部1212eによって特定されたアプリケーション種別が、アプリケーション種別判定部1212の判定結果として出力される。   The application type determination unit 1212 determines the application type of the project based on the project asset 111 configured as described above. That is, the project type determination unit 1212a determines the application type based on the project type in the project information table 1111. The configuration file determination unit 1212b determines the application type based on the file configuration of the project. The configuration file content determination unit 1212c determines the application type by analyzing the content of the source file that is a part of the configuration file. The build tool determination unit 1212d determines the application type based on the build tool used by the project. The application type identification unit 1212e identifies the application type based on the determination results of the project type determination unit 1212a, the configuration file determination unit 1212b, the configuration file content determination unit 1212c, the build tool determination unit 1212d, and the like. The application type specified by the application type specifying unit 1212e is output as the determination result of the application type determining unit 1212.

以下、ソフトウェア開発支援装置10の処理手順について説明する。図5は、開発環境提供部によるビルド時の処理手順を説明するためのフローチャートである。   The processing procedure of the software development support apparatus 10 will be described below. FIG. 5 is a flowchart for explaining a processing procedure at the time of building by the development environment providing unit.

開発環境提供部11のGUI(例えば、メニュー等)を介して、ユーザによってビルドの開始が指示されると、開発環境提供部11は、プロジェクト資産111におけるビルドツール情報1111cに定義された順番で、ビルドツール12を呼び出す(S101〜S104)。呼び出されたビルドツールは、当該ビルドツールに応じた処理を実行する。これによって、アプリケーションがビルドされる。なお、アプリケーションのビルドに必須でないビルドツール12は、ユーザの任意によってプロジェクトへの追加又は削除が可能である。したがって、規約チェックツール12cがプロジェクトに追加されている場合、ビルドにおける一連の処理の中で規約チェックツール12の処理が実行される。すなわち、本実施の形態におけるソフトウェア開発支援装置10は、コーディング規約のチェック作業をビルド作業の一つの処理として実行する。したがって、ユーザは、両作業を区別して行う必要はない。   When the start of the build is instructed by the user via the GUI (for example, menu etc.) of the development environment providing unit 11, the development environment providing unit 11 is in the order defined in the build tool information 1111c in the project asset 111. The build tool 12 is called (S101 to S104). The called build tool executes processing according to the build tool. This builds the application. The build tool 12 that is not essential for building an application can be added to or deleted from the project as desired by the user. Therefore, when the rule check tool 12c is added to the project, the rule check tool 12 process is executed in a series of processes in the build. That is, the software development support apparatus 10 according to the present embodiment executes the coding rule check work as one process of the build work. Therefore, the user does not need to perform both operations separately.

次に、図3の規約チェックツール12cの処理手順について説明する。図6は、規約チェックツールの処理手順を説明するためのフローチャートである。図6の処理は、図5のステップS104において、開発環境提供部11より規約チェックツール12cが呼び出された際に実行される。   Next, the processing procedure of the rule check tool 12c in FIG. 3 will be described. FIG. 6 is a flowchart for explaining the processing procedure of the convention check tool. The processing in FIG. 6 is executed when the contract check tool 12c is called from the development environment providing unit 11 in step S104 in FIG.

まず、アプリケーション種別判定部1212が、プロジェクト資産111に基づいてアプリケーション種別を判定する(S201)。続いて、適用規約判定部1213は、アプリケーション種別判定部1212によって判定されたアプリケーション種別と規約対応情報管理テーブル1214とに基づいて、当該アプリケーション種別に対応するコーディング規約1210を判定する(S202)。   First, the application type determination unit 1212 determines the application type based on the project asset 111 (S201). Subsequently, the application rule determination unit 1213 determines the coding rule 1210 corresponding to the application type based on the application type determined by the application type determination unit 1212 and the rule correspondence information management table 1214 (S202).

図7は、規約対応情報管理テーブルの構成例を示す図である。   FIG. 7 is a diagram illustrating a configuration example of the convention correspondence information management table.

図7において、規約対応情報管理テーブル1214には、アプリケーション種別ごとに、適用する規約(コーディング規約)が設定されている。例えば、図7によれば、アプリケーション種別がEJB(登録商標)(Enterprise JavaBeans(登録商標))の場合は、規約A、規約B、規約D、及び規約Gが適用されることになる。また、Webアプリケーション(Webアプリ)には、規約A、規約C、規約D及び規約Gが適用されることになる。なお、図7では、EJB(登録商標)及びWebアプリ以外を「その他」として分類しているが、「その他」に含まれるアプリケーション種別を細分化し、細分化されたアプリケーション種別ごとに、適用する規約を定義してもよい。   In FIG. 7, in the rule correspondence information management table 1214, a rule to be applied (coding rule) is set for each application type. For example, according to FIG. 7, when the application type is EJB (registered trademark) (Enterprise JavaBeans (registered trademark)), the rules A, B, D, and G are applied. Further, the rules A, C, D, and G are applied to the Web application (Web application). In FIG. 7, other than EJB (registered trademark) and Web application are classified as “others”, but the application types included in “others” are subdivided, and the rules to be applied for each subdivided application type May be defined.

続いて、ソースファイル抽出部1211は、プロジェクト資産111より、ソースファイル1110の一覧を抽出する(S203)。コーディング規約1210及びソースファイル1110の一覧は、チェック対象出力部1215によって規約チェック部122に出力される。規約チェック部122は、ソースファイル1110のソースコードが、コーディング規約1210に従ったものであるか否かのチェックを行う(S204)。   Subsequently, the source file extraction unit 1211 extracts a list of source files 1110 from the project asset 111 (S203). A list of coding conventions 1210 and source files 1110 are output to the convention check unit 122 by the check target output unit 1215. The rule checking unit 122 checks whether the source code of the source file 1110 conforms to the coding rule 1210 (S204).

次に、ステップS201におけるアプリケーション種別判定部1212による処理の詳細について説明する。図8は、アプリケーション種別判定部によるアプリケーション種別の判定処理の処理手順を説明するためのフローチャートである。   Next, details of processing by the application type determination unit 1212 in step S201 will be described. FIG. 8 is a flowchart for explaining the processing procedure of the application type determination process by the application type determination unit.

まず、ビルドツール判定部1212dは、ビルドツール情報1111cに基づいてアプリケーション種別を判定する(S301)。すなわち、ビルドツール情報1111cには、プロジェクトに追加されているビルドツール12が定義されている。また、アプリケーション種別は、プロジェクトが利用するビルドツールとある程度の対応関係を有する。そこで、ビルドツール判定部1212dは、この対応関係に基づいてアプリケーション種別を判定する。なお、一つのプロジェクトに対し、複数のビルドツールが追加され得る。   First, the build tool determination unit 1212d determines the application type based on the build tool information 1111c (S301). That is, the build tool 12 added to the project is defined in the build tool information 1111c. The application type has a certain degree of correspondence with the build tool used by the project. Therefore, the build tool determination unit 1212d determines the application type based on this correspondence. A plurality of build tools can be added to one project.

アプリケーション種別とビルドツールとの対応関係は、例えば、図9に示されるようなテーブル形式の情報として予め作成しておけばよい。   The correspondence relationship between the application type and the build tool may be created in advance as information in a table format as shown in FIG. 9, for example.

図9は、アプリケーション種別とビルドツールとの対応関係を管理するテーブルの構成例を示す図である。   FIG. 9 is a diagram illustrating a configuration example of a table for managing a correspondence relationship between an application type and a build tool.

図9において、テーブル1212d−1には、ビルドツールごとに関連し得るアプリケーション種別が定義されている。図9の例では、Java(登録商標)コンパイラは、全てのアプリケーション種別のビルドに用いられ得ることが定義されている。また、JavaBeans(登録商標)情報生成ツールは、クライアントアプリケーション又はライブラリ(クライアント/ライブラリ)のビルドに用いられ得ることが定義されている。また、Jarパッケージツールは、クライアントライブラリ、EJB(登録商標)、及びWebサービスのビルドに用いられ得ることが定義されている。   In FIG. 9, the table 1212d-1 defines application types that can be related to each build tool. In the example of FIG. 9, it is defined that the Java (registered trademark) compiler can be used for builds of all application types. Further, it is defined that the JavaBeans (registered trademark) information generation tool can be used for building a client application or a library (client / library). Further, it is defined that the Jar package tool can be used for building a client library, an EJB (registered trademark), and a Web service.

なお、アプリケーション種別とビルドツールとの対応関係を管理するテーブルは、図10のように構成してもよい。図10は、アプリケーション種別とビルドツールとの対応関係を管理するテーブルの第二の構成例を示す図である。   The table for managing the correspondence between the application type and the build tool may be configured as shown in FIG. FIG. 10 is a diagram illustrating a second configuration example of the table for managing the correspondence between the application type and the build tool.

図10において、テーブル1212d−2には、アプリケーション種別ごとに通常使われるビルドツールが定義されている。図10の例では、クライアントアプリケーション又はライブラリのビルドには、Java(登録商標)コンパイラ、JavaBeans(登録商標)情報生成ツール、JavaBeans(登録商標)マニフェスト生成ツール、及びJarパッケージツールが通常用いられることが定義されている。また、WebアプリのビルドにはJava(登録商標)コンパイラ、JSP(登録商標)(JavaServer Pages(登録商標))コンパイラ、及びWARパッケージツールが通常用いられることが定義されている。   In FIG. 10, a build tool normally used for each application type is defined in a table 1212d-2. In the example of FIG. 10, a Java (registered trademark) compiler, a JavaBeans (registered trademark) information generation tool, a JavaBeans (registered trademark) manifest generation tool, and a Jar package tool are normally used for building a client application or library. Is defined. In addition, it is defined that a Java (registered trademark) compiler, a JSP (registered trademark) (JavaServer Pages (registered trademark)) compiler, and a WAR package tool are normally used for building a Web application.

したがって、ビルドツール判定部1212dは、テーブル1212d−1又はテーブル1212d−2に基づいて、アプリケーション種別を判定する。例えば、Java(登録商標)コンパイラ、JSP(登録商標)コンパイラ、WARパッケージがビルドツールとしてプロジェクトに設定されている場合は、アプリケーション種別は「Webアプリ」と一意に特定される。アプリケーション種別が一意に特定された場合、ビルドツール判定部1212dは、当該アプリケーション種別をアプリケーション種別特定部1212eに出力する。   Therefore, the build tool determination unit 1212d determines the application type based on the table 1212d-1 or the table 1212d-2. For example, when a Java (registered trademark) compiler, JSP (registered trademark) compiler, and WAR package are set as a build tool in a project, the application type is uniquely identified as “Web application”. When the application type is uniquely specified, the build tool determining unit 1212d outputs the application type to the application type specifying unit 1212e.

ところで、ビルドツールに基づいて、アプリケーション種別が一意に特定できない場合がある。例えば、Java(登録商標)コンパイラ、JSP(登録商標)コンパイラ、EJB(登録商標)仕様検査ツールがビルドツールとしてプロジェクトに設定されている場合は、アプリケーション種別は「EJB(登録商標)」又は「Webアプリ」の可能性がある。この場合、ビルドツール判定部1212dは、当該複数のアプリケーション種別をアプリケーション種別特定部1212eに出力する。また、Java(登録商標)コンパイラのみがビルドツールとしてプロジェクトに設定されている場合は、全てのアプリケーション種別に可能性がある。この場合、ビルドツール判定部1212dは、「判定不能」をアプリケーション種別特定部1212eに出力する。   By the way, the application type may not be uniquely identified based on the build tool. For example, when a Java (registered trademark) compiler, a JSP (registered trademark) compiler, and an EJB (registered trademark) specification inspection tool are set as a build tool in a project, the application type is “EJB (registered trademark)” or “Web There is a possibility of "app". In this case, the build tool determining unit 1212d outputs the plurality of application types to the application type specifying unit 1212e. Further, when only a Java (registered trademark) compiler is set as a build tool in a project, there is a possibility for all application types. In this case, the build tool determination unit 1212d outputs “determination impossible” to the application type identification unit 1212e.

ビルドツール判定部1212dによってアプリケーション種別が一意に特定できた場合(S302でYes)、アプリケーション種別特定部1212eは、当該アプリケーション種別を適用規約判定部1213に出力し、当該処理を終了させる。   If the application type can be uniquely identified by the build tool determination unit 1212d (Yes in S302), the application type identification unit 1212e outputs the application type to the application rule determination unit 1213, and ends the process.

一方、ビルドツール判定部1212dによってアプリケーション種別が一意に特定できなかった場合(S302でNo)、構成ファイル判定部1212bが構成ファイル情報1111bに基づいて、アプリケーション種別を判定する(S303)。すなわち、構成ファイル情報1111bには、プロジェクトのファイル構成が定義されている。また、アプリケーション種別は、プロジェクトのファイル構成(プロジェクトにどのようなファイルが含まれているか)とある程度の対応関係を有する。そこで、構成ファイル判定部1212bは、この対応関係に基づいて、アプリケーション種別を判定する。   On the other hand, when the build tool determination unit 1212d cannot uniquely identify the application type (No in S302), the configuration file determination unit 1212b determines the application type based on the configuration file information 1111b (S303). That is, the file configuration of the project is defined in the configuration file information 1111b. The application type has a certain degree of correspondence with the file structure of the project (what kind of files are included in the project). Therefore, the configuration file determination unit 1212b determines the application type based on this correspondence.

図11は、アプリケーション種別とファイル構成との対応関係の例を示す図である。   FIG. 11 is a diagram illustrating an example of a correspondence relationship between an application type and a file configuration.

図11では、EJB(登録商標)の場合、ejb-jar.xmlが必須の構成ファイルであることが示されている。また、必須ではないが、ある特定のファイルが構成ファイルに含まれているとアプリケーション種別を特定できるものがある。例えば、図11では、web.xmlがあれば、Webアプリケーションであることが示されている。   FIG. 11 shows that in the case of EJB (registered trademark), ejb-jar.xml is an essential configuration file. In addition, although it is not essential, there are those that can specify the application type when a specific file is included in the configuration file. For example, in FIG. 11, if web.xml exists, it indicates that it is a Web application.

したがって、例えば、図11のような対応関係に基づく場合、ejb-jar.xml及びweb.xmlのうちいずれか一方のみが構成ファイルに含まれている場合は、アプリケーション種別は「EJB(登録商標)」又は「Webアプリ」のいずれか一方に特定される。したがって、この場合、構成ファイル判定部1212bは、一意に特定されたアプリケーション種別をアプリケーション種別特定部1212eに出力する。   Therefore, for example, when based on the correspondence as shown in FIG. 11, when only one of ejb-jar.xml and web.xml is included in the configuration file, the application type is “EJB (registered trademark)”. ”Or“ Web application ”. Therefore, in this case, the configuration file determining unit 1212b outputs the uniquely specified application type to the application type specifying unit 1212e.

また、ejb-jar.xml及びweb.xmlの双方が構成ファイルに含まれている場合、構成ファイル判定部1212eは、複数のアプリケーション種別(「EJB(登録商標)」及び「Webアプリ」)をアプリケーション種別特定部1212eに出力する。   When both ejb-jar.xml and web.xml are included in the configuration file, the configuration file determination unit 1212e uses a plurality of application types (“EJB (registered trademark)” and “Web application”) as applications. The data is output to the type identification unit 1212e.

また、いずれのファイルも構成ファイルに含まれていない場合、構成ファイル判定部1212eは、「判定不能」をアプリケーション種別特定部1212eに出力する。   When none of the files is included in the configuration file, the configuration file determination unit 1212e outputs “undeterminable” to the application type identification unit 1212e.

構成ファイル判定部1212bによってアプリケーション種別が一意に特定できた場合(S304でYes)、アプリケーション種別特定部1212eは、当該アプリケーション種別を適用規約判定部1213に出力し、当該処理を終了させる。   If the application file type can be uniquely identified by the configuration file determination unit 1212b (Yes in S304), the application type identification unit 1212e outputs the application type to the application rule determination unit 1213 and ends the process.

一方、構成ファイル判定部1212bによってアプリケーション種別が一意に特定できなかった場合(S304でNo)、構成ファイル内容判定部1212cが構成ファイルの内容に基づいて、アプリケーション種別を判定する(S305)。すなわち、アプリケーション種別は、構成ファイルの内容とある程度の対応関係を有する。そこで、構成ファイル内容判定部1212cは、この対応関係に基づいて、アプリケーション種別を判定する。   On the other hand, when the application file type cannot be uniquely identified by the configuration file determination unit 1212b (No in S304), the configuration file content determination unit 1212c determines the application type based on the content of the configuration file (S305). That is, the application type has a certain degree of correspondence with the contents of the configuration file. Therefore, the configuration file content determination unit 1212c determines the application type based on this correspondence.

具体的には、例えば、EJB(登録商標)であればインタフェース javax.ejb.EnterpriseBeanを実装したクラスが必要となる。したがって、構成ファイル内容判定部1212cは、ソースファイルの内容を解析し、どのインタフェースを実装しているのか、どのクラスを継承しているのか等を調べることで、アプリケーション種別を判定する。   Specifically, for example, in the case of EJB (registered trademark), a class that implements the interface javax.ejb.EnterpriseBean is required. Therefore, the configuration file content determination unit 1212c determines the application type by analyzing the content of the source file and examining which interface is implemented and which class is inherited.

図12は、アプリケーション種別と構成ファイルの内容との対応関係の例を示す図である。   FIG. 12 is a diagram illustrating an example of a correspondence relationship between the application type and the contents of the configuration file.

図12によれば、「javax.servlet.http.HttpServletクラス」を継承しているクラスが存在する場合、アプリケーション種別の判定結果に「Webアプリ」が含まれる。また、「javax.ejb.EnterpriseBeanインタフェース」を実装しているクラスがある場合、アプリケーション種別の判定結果に「EJB(登録商標)」が含まれる。また、「java.awt.Componentクラス」を継承しているクラスが存在する場合、アプリケーション種別の判定結果に「クライアントアプリ」が含まれる。いずれにも該当しない場合は、「判定不能」が判定結果とされる。構成ファイル内容判定部1212cによる判定結果は、アプリケーション種別特定部1212eに出力される。なお、クラス又はインタフェースの継承の有無は、ソースコード内に当該クラス又はインタフェースを継承することを示す文字列が含まれているか否かによって判定すればよい。   According to FIG. 12, when there is a class that inherits the “javax.servlet.http.HttpServlet class”, the determination result of the application type includes “Web application”. When there is a class that implements the “javax.ejb.EnterpriseBean interface”, “EJB (registered trademark)” is included in the determination result of the application type. Further, when there is a class that inherits the “java.awt.Component class”, the determination result of the application type includes “client application”. If none of these are applicable, “determination impossible” is set as the determination result. The determination result by the configuration file content determination unit 1212c is output to the application type identification unit 1212e. Whether or not a class or interface is inherited may be determined based on whether or not a character string indicating that the class or interface is inherited is included in the source code.

構成ファイル内容判定部1212cによってアプリケーション種別が一意に特定できた場合(S306でYes)、アプリケーション種別特定部1212eは、当該アプリケーション種別を適用規約判定部1213に出力し、当該処理を終了させる。   When the application file type can be uniquely identified by the configuration file content determination unit 1212c (Yes in S306), the application type identification unit 1212e outputs the application type to the application rule determination unit 1213, and ends the process.

一方、構成ファイル内容判定部1212cによってアプリケーション種別が一意に特定できなかった場合(S306でNo)、プロジェクト種別判定部1212aがプロジェクト種別1111aに基づいて、アプリケーション種別を判定する(S307)。すなわち、プロジェクト種別1212aは、当該プロジェクトを作成する際にどのようなアプリケーションを作成する予定であるかを示す情報に基づいて開発環境提供部111によって選択される情報であり、アプリケーション種別との間に対応関係を有する。そこで、プロジェクト種別判定部1212aは、この対応関係に基づいて、アプリケーション種別を判定する。   On the other hand, if the application type cannot be uniquely identified by the configuration file content determination unit 1212c (No in S306), the project type determination unit 1212a determines the application type based on the project type 1111a (S307). That is, the project type 1212a is information selected by the development environment providing unit 111 based on information indicating what kind of application is scheduled to be created when the project is created. Have a correspondence. Therefore, the project type determination unit 1212a determines the application type based on this correspondence.

図13は、アプリケーション種別とプロジェクト種別との対応関係を示す図である。   FIG. 13 is a diagram illustrating a correspondence relationship between application types and project types.

図13の例では、プロジェクト種別ごとに対応するアプリケーション種別の例が示されている。図13の例では、アプリケーション種別の粒度はプロジェクト種別の粒度より大きい。したがって、この場合、プロジェクト種別に基づいてアプリケーション種別が一意に判定される。例えば、プロジェクト種別が「appletproject」の場合、アプリケーション種別は「アプレット」と判定される。また、プロジェクト種別が「soapproject」の場合、アプリケーション種別は「Webサービス」と判定される。したがって、プロジェクト種別判定部1212aよりアプリケーション種別特定部1212eに出力されるアプリケーション種別は一意なものとなり、アプリケーション種別特定部1212eは、当該アプリケーション種別を適用規約判定部1213に出力する。   In the example of FIG. 13, an example of application types corresponding to each project type is shown. In the example of FIG. 13, the granularity of the application type is larger than the granularity of the project type. Therefore, in this case, the application type is uniquely determined based on the project type. For example, when the project type is “appletproject”, the application type is determined to be “applet”. When the project type is “soapproject”, the application type is determined to be “Web service”. Therefore, the application type output from the project type determining unit 1212a to the application type specifying unit 1212e is unique, and the application type specifying unit 1212e outputs the application type to the application rule determining unit 1213.

ところで、プロジェクト種別に応じてアプリケーション種別が一意に特定できるのであれば、プロジェクト種別のみに基づいてアプリケーション種別を判定すればよいと考えられる。しかしながら、本実施の形態では、プロジェクト種別とアプリケーション種別との対応関係が必ずしも保証されない場合をも考慮している。すなわち、プロジェクト種別は、プロジェクトの生成時に定まる情報であるところ、実際のアプリケーション種別は、その後の開発作業(ビルドツールの追加又は削除、構成ファイルの追加又は削除、コーディング等)によって変化し得る情報であることを想定しているのである。したがって、本実施の形態では、ビルドツール、ファイル構成、構成ファイルの内容、プロジェクト種別の順番でアプリケーション種別を判定しているのである。なお、判定の順番は、判定に用いる情報とアプリケーション種別との対応関係の強い順(すなわち、判定に用いる情報の信頼性の高い順)にすることが望ましい。信頼性の低い情報に基づいて一意に判定されたアプリケーション種別は、信頼性が低いからである。本実施の形態では、ビルドツール、ファイル構成、構成ファイルの内容、プロジェクト種別の順番で信頼性が高い場合を例としたのであり、この順番は、信頼性の高さに応じて適宜変更してもよい。   By the way, if the application type can be uniquely identified according to the project type, it is considered that the application type may be determined based only on the project type. However, in the present embodiment, the case where the correspondence between the project type and the application type is not necessarily guaranteed is also taken into consideration. In other words, the project type is information that is determined at the time of project generation, but the actual application type is information that can be changed by subsequent development work (addition or deletion of build tools, addition or deletion of configuration files, coding, etc.). It is assumed that there is. Therefore, in this embodiment, the application type is determined in the order of the build tool, the file configuration, the contents of the configuration file, and the project type. The order of determination is desirably the order in which the correspondence between the information used for determination and the application type is strong (that is, the order in which the reliability of the information used for determination is high). This is because an application type uniquely determined based on information with low reliability has low reliability. In this embodiment, the case where the reliability is high in the order of the build tool, the file structure, the contents of the configuration file, and the project type is taken as an example, and this order is appropriately changed according to the high reliability. Also good.

また、アプリケーション種別の判定は、常に上記4つの情報に基づいて行わなくてもよい。例えば、ファイル構成とプロジェクト種別に基づいて行ってもよい。但し、ファイル構成とプロジェクト種別に基づいてアプリケーション種別が一意に定まらないケースがある場合、ビルドツールや構成ファイルの内容等を用いることにより判定結果の精度を向上させることが望ましい。   Further, the determination of the application type may not always be performed based on the above four pieces of information. For example, it may be performed based on the file configuration and project type. However, when there is a case where the application type is not uniquely determined based on the file configuration and the project type, it is desirable to improve the accuracy of the determination result by using the contents of the build tool or the configuration file.

上述したように、本発明の実施の形態におけるソフトウェア開発支援装置10によれば、コーディング規約のチェック対象とするアプリケーションのアプリケーション種別を自動的に判定し、当該アプリケーション種別に応じたコーディング規約を自動的に選択することができる。したがって、アプリケーション種別の選択や適用するコーディング規約の選択等の煩雑な作業からユーザを解放することができ、生産性の向上を図ることができる。   As described above, according to the software development support apparatus 10 in the embodiment of the present invention, the application type of the application to be checked for the coding rule is automatically determined, and the coding rule corresponding to the application type is automatically determined. Can be selected. Therefore, the user can be freed from complicated operations such as selection of application type and selection of coding convention to be applied, and productivity can be improved.

以上、本発明の実施例について詳述したが、本発明は係る特定の実施形態に限定されるものではなく、特許請求の範囲に記載された本発明の要旨の範囲内において、種々の変形・変更が可能である。   As mentioned above, although the Example of this invention was explained in full detail, this invention is not limited to the specific embodiment which concerns, In the range of the summary of this invention described in the claim, various deformation | transformation * It can be changed.

以上の説明に関し、更に以下の項を開示する。
(付記1) コンピュータに、
アプリケーションの開発環境として定義されたプロジェクトのファイル構成に基づいて前記アプリケーションの種別を判定するファイル構成判定手順と、
前記プロジェクトの種別に基づいて当該アプリケーションの種別を判定するプロジェクト種別判定手順と、
前記アプリケーションの種別に応じて前記アプリケーションのソースコードに適用されるコーディング規約が定義された規約対応情報と、前記ファイル構成判定手順及び前記プロジェクト種別判定手順における少なくともいずれか一つの判定結果によって特定されるアプリケーションの種別とに基づいて、当該アプリケーションのソースコードに適用されるコーディング規約を判定する適用規約判定手順とを実行させるためのコーディング規約選択プログラム。
(付記2) 前記ファイル構成判定手順において前記アプリケーションの種別が一意に特定されない場合に、前記プロジェクト種別判定手順を実行させることを特徴とする付記1記載のコーディング規約選択プログラム。
(付記3) 前記ファイル構成判定手順は、前記プロジェクトを構成するファイルにおける所定のファイルの有無に基づいて、前記アプリケーションの種別を判定することを特徴とする付記1又は2記載のコーディング規約選択プログラム。
(付記4) 前記プロジェクトにおいて前記アプリケーションのビルドに用いられるプログラムの構成に基づいて前記アプリケーションの種別を判定するビルドツール判定手順を有し、
前記適用規約判定手順は、前記規約対応情報と、前記ビルドツール判定手順、前記ファイル構成判定手順、及び前記プロジェクト種別判定手順における少なくともいずれか一つの判定結果によって特定されるアプリケーションの種別とに基づいて、当該アプリケーションのソースコードに適用されるコーディング規約を判定することを特徴とする付記1乃至3いずれか一項記載のコーディング規約選択プログラム。
(付記5) 前記ビルドツール判定手順において前記アプリケーションの種別が一意に特定されない場合に、前記ファイル構成判定手順を実行させることを特徴とする付記4記載のコーディング規約選択プログラム。
(付記6) 前記ビルドツール判定手順及び前記ファイル構成判定手順において前記アプリケーションの種別が一意に特定されない場合に、前記プロジェクト種別判定手順を実行させることを特徴とする付記5記載のコーディング規約選択プログラム。
(付記7) 前記プロジェクトを構成する所定のファイルの内容に基づいて前記アプリケーションの種別を判定するファイル内容判定手順を有し、
前記適用規約判定手順は、前記規約対応情報と、前記ファイル内容判定手順、前記ファイル構成判定手順、及び前記プロジェクト種別判定手順における少なくともいずれか一つの判定結果によって特定されるアプリケーションの種別とに基づいて、当該アプリケーションのソースコードに適用されるコーディング規約を判定することを特徴とする付記1乃至3いずれか一項記載のコーディング規約選択プログラム。
(付記8) 前記ファイル構成判定手順において前記アプリケーションの種別が一意に特定されない場合に、前記ファイル内容判定手順を実行させることを特徴とする付記7記載のコーディング規約選択プログラム。
(付記9) 前記ファイル構成判定手順及び前記ファイル内容判定手順において前記アプリケーションの種別が一意に特定されない場合に、前記プロジェクト種別判定手順を実行させることを特徴とする付記8記載のコーディング規約選択プログラム。
(付記10) 前記プロジェクトを構成する所定のファイルの内容に基づいて前記アプリケーションの種別を判定するファイル内容判定手順を有し、
前記適用規約判定手順は、前記規約対応情報と、前記ファイル内容判定手順、前記ビルドツール判定手順、前記ファイル構成判定手順、及び前記プロジェクト種別判定手順における少なくともいずれか一つの判定結果によって特定されるアプリケーションの種別とに基づいて、当該アプリケーションのソースコードに適用されるコーディング規約を判定することを特徴とする付記4乃至6いずれか一項記載のコーディング規約選択プログラム。
(付記11) 前記ファイル構成判定手順において前記アプリケーションの種別が一意に特定されない場合に、前記ファイル内容判定手順を実行させることを特徴とする付記10記載のコーディング規約選択プログラム。
(付記12) 前記ビルドツール判定手順、前記ファイル構成判定手順及び前記ファイル内容判定手順において前記アプリケーションの種別が一意に特定されない場合に、前記プロジェクト種別判定手順を実行させることを特徴とする付記11記載のコーディング規約選択プログラム。
(付記13) 前記ファイル内容判定手順は、前記アプリケーションのソースコードにおける所定の文字列の有無に基づいて前記アプリケーションの種別を判定することを特徴とする付記7乃至12いずれか一項記載のコーディング規約選択プログラム。
(付記14) 付記1乃至13いずれか一項記載のコーディング規約選択プログラムを記録したコンピュータ読み取り可能な記録媒体。
(付記15) コンピュータを用いてアプリケーションのソースコードに適用するコーディング規約を選択するコーディング規約選択方法であって、
アプリケーションの開発環境として定義されたプロジェクトのファイル構成に基づいて前記アプリケーションの種別を判定するファイル構成判定手順と、
前記プロジェクトの種別に基づいて当該アプリケーションの種別を判定するプロジェクト種別判定手順と、
前記アプリケーションの種別に応じて前記アプリケーションのソースコードに適用されるコーディング規約が定義された規約対応情報と、前記ファイル構成判定手順及び前記プロジェクト種別判定手順における少なくともいずれか一つの判定結果によって特定されるアプリケーションの種別とに基づいて、当該アプリケーションのソースコードに適用されるコーディング規約を判定する適用規約判定手順とを有することを特徴とするコーディング規約選択方法。
(付記16) アプリケーションの開発環境として定義されたプロジェクトのファイル構成に基づいて前記アプリケーションの種別を判定するファイル構成判定手段と、
前記プロジェクトの種別に基づいて当該アプリケーションの種別を判定するプロジェクト種別判定手段と、
前記アプリケーションの種別に応じて前記アプリケーションのソースコードに適用されるコーディング規約が定義された規約対応情報と、前記ファイル構成判定手段及び前記プロジェクト種別判定手段による少なくともいずれか一つの判定結果によって特定されるアプリケーションの種別とに基づいて、当該アプリケーションのソースコードに適用されるコーディング規約を判定する適用規約判定手段とを有することを特徴とするコーディング規約選択装置。
Regarding the above description, the following items are further disclosed.
(Supplementary note 1)
A file configuration determination procedure for determining the type of the application based on the file configuration of a project defined as an application development environment;
A project type determination procedure for determining the type of the application based on the type of the project;
It is specified by the rule correspondence information in which the coding rule applied to the source code of the application is defined according to the type of the application, and at least one determination result in the file configuration determination procedure and the project type determination procedure A coding rule selection program for executing an application rule determining procedure for determining a coding rule applied to the source code of the application based on the type of application.
(Supplementary note 2) The coding rule selection program according to supplementary note 1, wherein the project type determination procedure is executed when the type of the application is not uniquely specified in the file configuration determination procedure.
(Supplementary note 3) The coding rule selection program according to supplementary note 1 or 2, wherein the file configuration determination procedure determines the type of the application based on the presence or absence of a predetermined file in the files constituting the project.
(Additional remark 4) It has the build tool determination procedure which determines the classification of the said application based on the structure of the program used for the build of the said application in the said project,
The applicable contract determination procedure is based on the contract correspondence information and the type of application specified by at least one determination result in the build tool determination procedure, the file configuration determination procedure, and the project type determination procedure. The coding rule selection program according to any one of appendices 1 to 3, wherein a coding rule to be applied to the source code of the application is determined.
(Supplementary note 5) The coding rule selection program according to supplementary note 4, wherein the file configuration determination procedure is executed when the type of the application is not uniquely specified in the build tool determination procedure.
(Supplementary note 6) The coding rule selection program according to supplementary note 5, wherein when the type of the application is not uniquely specified in the build tool determination procedure and the file configuration determination procedure, the project type determination procedure is executed.
(Additional remark 7) It has the file content determination procedure which determines the classification of the said application based on the content of the predetermined file which comprises the said project,
The application rule determination procedure is based on the rule correspondence information and the type of application specified by at least one determination result in the file content determination procedure, the file configuration determination procedure, and the project type determination procedure. The coding rule selection program according to any one of appendices 1 to 3, wherein a coding rule to be applied to the source code of the application is determined.
(Supplementary note 8) The coding rule selection program according to supplementary note 7, wherein the file content determination procedure is executed when the type of the application is not uniquely specified in the file configuration determination procedure.
(Supplementary note 9) The coding rule selection program according to supplementary note 8, wherein the project type determination procedure is executed when the type of the application is not uniquely identified in the file configuration determination procedure and the file content determination procedure.
(Additional remark 10) It has the file content determination procedure which determines the classification of the said application based on the content of the predetermined file which comprises the said project,
The application rule determination procedure is an application specified by the rule correspondence information and at least one determination result in the file content determination procedure, the build tool determination procedure, the file configuration determination procedure, and the project type determination procedure. 7. The coding rule selection program according to any one of appendices 4 to 6, wherein the coding rule applied to the source code of the application is determined based on the type of the coding.
(Supplementary note 11) The coding rule selection program according to supplementary note 10, wherein the file content determination procedure is executed when the type of the application is not uniquely identified in the file configuration determination procedure.
(Additional remark 12) The said project type determination procedure is performed when the said application type is not uniquely specified in the said build tool determination procedure, the said file structure determination procedure, and the said file content determination procedure, The additional description 11 characterized by the above-mentioned. Coding convention selection program.
(Supplementary note 13) The coding rule according to any one of Supplementary notes 7 to 12, wherein the file content determination procedure determines the type of the application based on the presence or absence of a predetermined character string in the source code of the application. Selection program.
(Additional remark 14) The computer-readable recording medium which recorded the coding rule selection program as described in any one of additional marks 1 thru | or 13.
(Supplementary note 15) A coding rule selection method for selecting a coding rule to be applied to an application source code using a computer,
A file configuration determination procedure for determining the type of the application based on the file configuration of a project defined as an application development environment;
A project type determination procedure for determining the type of the application based on the type of the project;
It is specified by the rule correspondence information in which the coding rule applied to the source code of the application is defined according to the type of the application, and at least one determination result in the file configuration determination procedure and the project type determination procedure A coding rule selection method comprising: an application rule determining procedure for determining a coding rule applied to a source code of an application based on an application type.
(Supplementary Note 16) File configuration determination means for determining the type of the application based on the file configuration of the project defined as the application development environment;
Project type determination means for determining the type of the application based on the type of the project;
It is specified by the rule correspondence information in which the coding rule applied to the source code of the application is defined according to the type of the application, and at least one determination result by the file configuration determination unit and the project type determination unit. A coding rule selecting device comprising: application rule determining means for determining a coding rule applied to the source code of the application based on the type of application.

本発明の実施の形態におけるソフトウェア開発支援装置のハードウェア構成例を示す図である。It is a figure which shows the hardware structural example of the software development assistance apparatus in embodiment of this invention. 本発明の実施の形態におけるソフトウェア開発支援装置の機能構成例を示す図である。It is a figure which shows the function structural example of the software development assistance apparatus in embodiment of this invention. 本発明の実施の形態における規約チェックツールの機能構成例を示す図である。It is a figure which shows the function structural example of the rule check tool in embodiment of this invention. アプリケーション種別判定部の機能構成例を示す図である。It is a figure which shows the function structural example of an application classification determination part. 開発環境提供部によるビルド時の処理手順を説明するためのフローチャートである。It is a flowchart for demonstrating the process sequence at the time of the build by a development environment provision part. 規約チェックツールの処理手順を説明するためのフローチャートである。It is a flowchart for demonstrating the process sequence of a rule check tool. 規約対応情報管理テーブルの構成例を示す図である。It is a figure which shows the structural example of a rule corresponding | compatible information management table. アプリケーション種別判定部によるアプリケーション種別の判定処理の処理手順を説明するためのフローチャートである。It is a flowchart for demonstrating the process sequence of the determination process of an application classification by an application classification determination part. アプリケーション種別とビルドツールとの対応関係を管理するテーブルの構成例を示す図である。It is a figure which shows the structural example of the table which manages the correspondence between application classification and a build tool. アプリケーション種別とビルドツールとの対応関係を管理するテーブルの第二の構成例を示す図である。It is a figure which shows the 2nd structural example of the table which manages the correspondence between an application classification and a build tool. アプリケーション種別とファイル構成との対応関係の例を示す図である。It is a figure which shows the example of the correspondence of application classification and file structure. アプリケーション種別と構成ファイルの内容との対応関係の例を示す図である。It is a figure which shows the example of the correspondence of application classification and the content of a configuration file. アプリケーション種別とプロジェクト種別との対応関係を示す図である。It is a figure which shows the correspondence of application classification and project classification.

符号の説明Explanation of symbols

10 ソフトウェア開発支援装置
11 開発環境提供部
12、12a、12b ビルドツール
12c 規約チェックツール
100 ドライブ装置
101 記録媒体
102 補助記憶装置
103 メモリ装置
104 演算処理装置
105 表示装置
106 入力装置
111 プロジェクト資産
121 規約選択部
122 規約チェック部
1110 ソースファイル
1210 コーディング規約
1211 ソースファイル抽出部
1212 アプリケーション種別判定部
1212a プロジェクト種別判定部
1212b 構成ファイル判定部
1212c 構成ファイル内容判定部
1212d ビルドツール判定部
1213 適用規約判定部
1214 規約対応情報管理テーブル
1215 チェック対象出力部
B バス
DESCRIPTION OF SYMBOLS 10 Software development support apparatus 11 Development environment provision part 12, 12a, 12b Build tool 12c Contract check tool 100 Drive apparatus 101 Recording medium 102 Auxiliary storage apparatus 103 Memory apparatus 104 Arithmetic processing apparatus 105 Display apparatus 106 Input apparatus 111 Project assets 121 Contract selection Unit 122 rule check unit 1110 source file 1210 coding rule 1211 source file extraction unit 1212 application type determination unit 1212a project type determination unit 1212b configuration file determination unit 1212c configuration file content determination unit 1212d build tool determination unit 1213 applicable rule determination unit 1214 Information management table 1215 Check target output unit B bus

Claims (5)

コンピュータに、
アプリケーションの開発環境として定義されたプロジェクトのファイル構成に基づいて前記アプリケーションの種別を判定するファイル構成判定手順と、
前記プロジェクトの種別に基づいて当該アプリケーションの種別を判定するプロジェクト種別判定手順と、
前記アプリケーションの種別に応じて前記アプリケーションのソースコードに適用されるコーディング規約が定義された規約対応情報と、前記ファイル構成判定手順及び前記プロジェクト種別判定手順における少なくともいずれか一つの判定結果によって特定されるアプリケーションの種別とに基づいて、当該アプリケーションのソースコードに適用されるコーディング規約を判定する適用規約判定手順とを実行させるためのコーディング規約選択プログラム。
On the computer,
A file configuration determination procedure for determining the type of the application based on the file configuration of a project defined as an application development environment;
A project type determination procedure for determining the type of the application based on the type of the project;
It is specified by the rule correspondence information in which the coding rule applied to the source code of the application is defined according to the type of the application, and at least one determination result in the file configuration determination procedure and the project type determination procedure A coding rule selection program for executing an application rule determining procedure for determining a coding rule applied to the source code of the application based on the type of application.
前記ファイル構成判定手順において前記アプリケーションの種別が一意に特定されない場合に、前記プロジェクト種別判定手順を実行させることを特徴とする請求項1記載のコーディング規約選択プログラム。 The coding rule selection program according to claim 1, wherein the project type determination procedure is executed when the type of the application is not uniquely specified in the file configuration determination procedure. 前記プロジェクトにおいて前記アプリケーションのビルドに用いられるプログラムの構成に基づいて前記アプリケーションの種別を判定するビルドツール判定手順を有し、
前記適用規約判定手順は、前記規約対応情報と、前記ビルドツール判定手順、前記ファイル構成判定手順、及び前記プロジェクト種別判定手順における少なくともいずれか一つの判定結果によって特定されるアプリケーションの種別とに基づいて、当該アプリケーションのソースコードに適用されるコーディング規約を判定することを特徴とする請求項1又は2記載のコーディング規約選択プログラム。
A build tool determination procedure for determining a type of the application based on a configuration of a program used for building the application in the project;
The applicable contract determination procedure is based on the contract correspondence information and the type of application specified by at least one determination result in the build tool determination procedure, the file configuration determination procedure, and the project type determination procedure. The coding rule selection program according to claim 1 or 2, wherein a coding rule applied to the source code of the application is determined.
前記ビルドツール判定手順において前記アプリケーションの種別が一意に特定されない場合に、前記ファイル構成判定手順を実行させることを特徴とする請求項3記載のコーディング規約選択プログラム。 4. The coding rule selection program according to claim 3, wherein the file configuration determination procedure is executed when the type of the application is not uniquely specified in the build tool determination procedure. 前記プロジェクトを構成する所定のファイルの内容に基づいて前記アプリケーションの種別を判定するファイル内容判定手順を有し、
前記適用規約判定手順は、前記規約対応情報と、前記ファイル内容判定手順、前記ファイル構成判定手順、及び前記プロジェクト種別判定手順における少なくともいずれか一つの判定結果によって特定されるアプリケーションの種別とに基づいて、当該アプリケーションのソースコードに適用されるコーディング規約を判定することを特徴とする請求項1又は2記載のコーディング規約選択プログラム。
A file content determination procedure for determining the type of the application based on the content of a predetermined file constituting the project,
The application rule determination procedure is based on the rule correspondence information and the type of application specified by at least one determination result in the file content determination procedure, the file configuration determination procedure, and the project type determination procedure. The coding rule selection program according to claim 1 or 2, wherein a coding rule applied to the source code of the application is determined.
JP2006019390A 2006-01-27 2006-01-27 Check program and check method Expired - Fee Related JP4983027B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2006019390A JP4983027B2 (en) 2006-01-27 2006-01-27 Check program and check method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2006019390A JP4983027B2 (en) 2006-01-27 2006-01-27 Check program and check method

Publications (2)

Publication Number Publication Date
JP2007200125A true JP2007200125A (en) 2007-08-09
JP4983027B2 JP4983027B2 (en) 2012-07-25

Family

ID=38454666

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006019390A Expired - Fee Related JP4983027B2 (en) 2006-01-27 2006-01-27 Check program and check method

Country Status (1)

Country Link
JP (1) JP4983027B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2019020990A (en) * 2017-07-14 2019-02-07 富士通株式会社 Program, information processing device and information processing method
WO2023218875A1 (en) * 2022-05-13 2023-11-16 日立Astemo株式会社 System construction device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0527951A (en) * 1991-07-19 1993-02-05 Hitachi Ltd Program group management system
JPH0612249A (en) * 1992-06-24 1994-01-21 Nec Corp Program information editing system
JP2000003283A (en) * 1998-06-15 2000-01-07 Nec Corp Program production support device
JP2006018735A (en) * 2004-07-05 2006-01-19 Hitachi Software Eng Co Ltd Coding standard observance situation monitoring system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0527951A (en) * 1991-07-19 1993-02-05 Hitachi Ltd Program group management system
JPH0612249A (en) * 1992-06-24 1994-01-21 Nec Corp Program information editing system
JP2000003283A (en) * 1998-06-15 2000-01-07 Nec Corp Program production support device
JP2006018735A (en) * 2004-07-05 2006-01-19 Hitachi Software Eng Co Ltd Coding standard observance situation monitoring system

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2019020990A (en) * 2017-07-14 2019-02-07 富士通株式会社 Program, information processing device and information processing method
WO2023218875A1 (en) * 2022-05-13 2023-11-16 日立Astemo株式会社 System construction device

Also Published As

Publication number Publication date
JP4983027B2 (en) 2012-07-25

Similar Documents

Publication Publication Date Title
JP4619698B2 (en) Code segment creation method and system
JP4395761B2 (en) Program test support apparatus and method
US8285662B2 (en) Framework for delta analysis during automated builds
KR20060050370A (en) System and method for selecting test case execution behaviors for reproducible test automation
US20070038993A1 (en) Method of identifying and checking software installation requirements
US7721250B2 (en) System and method for interactive and integrated software development process and phases
JP2003186708A (en) Access right contradiction detecting device and analytical rule making device
US11409631B2 (en) Verification automation apparatus, verification automation method, and computer-readable recording medium
JP5176478B2 (en) Data flow analysis device, data flow analysis method, and data flow analysis program
US9274755B2 (en) Infrastructure for generating code using annotation and template generators
JP2010122959A (en) Test support system, method, and program
JP4983027B2 (en) Check program and check method
JP6107455B2 (en) Test schedule determination device and program
JP2008276735A (en) Program code converter and program code conversion method
WO2004051470A1 (en) Program automatic converting method and program automatic converting device
JP6013315B2 (en) Application development support program and application development support system
JP5758311B2 (en) Test code generation device, test code generation method, test code generation program
JP5720531B2 (en) Help creation support device, help creation support program, and help creation support method
JP2008197897A (en) Test pattern generation apparatus and generation method
US20130191813A1 (en) Metamodeling Contextual Navigation of Computer Software Applications
JP5556480B2 (en) Context Violation Detection Support Method, Context Violation Detection Support Device, and Context Violation Detection Support Program
JP2009205242A (en) Automatic generation device of program for verification, and method and program thereof
JP2007115155A (en) Program structure management device and program structure management program
JP5343840B2 (en) Program analysis apparatus and analysis method
JP7328922B2 (en) Setting device, setting method, and program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20080723

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20110418

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20110524

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20110725

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20120327

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20120409

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20150511

Year of fee payment: 3

LAPS Cancellation because of no payment of annual fees