CN112346967B - Pc-lint cloud service system based on cloud platform, computer equipment and storage medium - Google Patents

Pc-lint cloud service system based on cloud platform, computer equipment and storage medium Download PDF

Info

Publication number
CN112346967B
CN112346967B CN202011124866.5A CN202011124866A CN112346967B CN 112346967 B CN112346967 B CN 112346967B CN 202011124866 A CN202011124866 A CN 202011124866A CN 112346967 B CN112346967 B CN 112346967B
Authority
CN
China
Prior art keywords
file
lint
source code
service system
cloud service
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.)
Active
Application number
CN202011124866.5A
Other languages
Chinese (zh)
Other versions
CN112346967A (en
Inventor
孔维涛
黄欣欣
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.)
Sichuan Changhong Electric Co Ltd
Original Assignee
Sichuan Changhong Electric Co 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 Sichuan Changhong Electric Co Ltd filed Critical Sichuan Changhong Electric Co Ltd
Priority to CN202011124866.5A priority Critical patent/CN112346967B/en
Publication of CN112346967A publication Critical patent/CN112346967A/en
Application granted granted Critical
Publication of CN112346967B publication Critical patent/CN112346967B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3604Software analysis for verifying properties of programs
    • G06F11/3608Software analysis for verifying properties of programs using formal methods, e.g. model checking, abstract interpretation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/362Software debugging
    • G06F11/3624Software debugging by performing operations on the source code, e.g. via a compiler

Abstract

The invention discloses a pc-lint cloud service system based on a cloud platform, which comprises a client window module and a cloud service system background, wherein the client window module and the cloud service system background are in communication connection; the client window module comprises a user login unit and a pc-lint use option unit, the user login unit is used for providing a login inlet for a user, the pc-lint use option unit is composed of a plurality of option columns, the pc-lint code inspection tool is cloud-serviced, the pc-lint use process is simplified to a great extent, a file mapping module and the like are additionally arranged, the client window module is adapted to different development systems and compilers, and the pc-lint use range is expanded. The pc-lint cloud service system improves the enthusiasm of programmers for using the pc-lint, and improves the reliability of programming software.

Description

Pc-lint cloud service system based on cloud platform, computer equipment and storage medium
Technical Field
The invention relates to the technical field of computer software programming, in particular to a pc-lint cloud service system based on a cloud platform, computer equipment and a storage medium.
Background
The flexibility of the C/C + + language brings about the improvement of code efficiency, but correspondingly brings about the randomness of code writing, and in addition, the C/C + + compiler does not carry out mandatory type check and also brings about the hidden trouble of code writing. PCLint recognizes and reports the occurrence of programming traps and format defects in the C/C + + language. It performs a global analysis of the code, can identify array indices that have not been properly checked, report uninitialized variables, warn of using null pointers, redundant code, and the like. Software debugging is a major factor in the cost and delay of software project development. The PClint is able to discover coding errors prior to program dynamic testing. This eliminates errors at a lower cost. The PC-Lint is used for checking before code reading and unit testing, so that program hiding errors can be found in advance, the code quality is improved, the testing time is saved, and the coding behavior of software personnel is standardized.
In the existing pc-lin use method, programmers download and install pc-lin by themselves, the efficiency of downloading the pc-lin by themselves is low, corresponding compilers need to be selected in the process of downloading and installing the pc-lin, the embedded development process is generally developed under linux, the pc-lin cannot be used in linux, the compilers under linux and windows are different, for example, gcc compilers are used under linux, pc-lin can only download mingw compilers similar to linux under windows, except for differences between the two, some library files of the system are also different, and therefore great inconvenience is caused in the use process of the pc-lin. Besides, some lnt files are needed to be configured in the use process of the pc-lint, and are used for checking the directory of the source code files and filtering specified checking results and alarms. This process of configuring the lnt file is also cumbersome, and greatly affects the use of the pc-lint.
The problem seriously affects the enthusiasm of programmers for code static inspection, and further affects the improvement of software quality.
Disclosure of Invention
The invention aims to overcome the defects in the background art, and provides a pc-lint cloud service system, computer equipment and a storage medium based on a cloud platform.
In order to achieve the technical effects, the invention adopts the following technical scheme:
a pc-lint cloud service system based on a cloud platform comprises a client window module and a cloud service system background which are in communication connection with each other;
the client window module comprises a user login unit and a pc-lint use option unit, the user login unit is used for providing a login entry for a user, the pc-lint use option unit is composed of a plurality of options, and the options at least comprise:
the source code project file option bar is used for selecting a path where a project file to be detected is located;
the source code engineering file operation system option bar is used for selecting a system used during compiling the source code engineering file;
the source code engineering file compiler option bar is used for selecting a compiler required by compiling the source code engineering file;
a result file output path option bar used for selecting the specified file path of the check result file stored in the local; the pc-lint check result is stored in the check result file;
the cloud service system background at least comprises:
the file mapping module is used for mapping the source code engineering file input by the user from the client to the cloud service system background;
the file detection module is used for detecting and classifying file names in a source code engineering file operating system, a source code engineering file compiler and a source code engineering file selected by a user;
the lnt file generating module of the pc-lint is used for processing the file names which are detected and classified by the file detecting module, generating different pc-lint parameters according to different classifications and storing the parameters into corresponding lnt files;
the pc-lint operation module is used for operating the pc-lint according to the lnt file through a command line to check a source code file;
and the pc-lint check result output module is used for generating a check result file and outputting the check result file to a specified file path.
Further, the option bar further comprises: and an inspection result filtering option column for selecting inspection filtering conditions, including selecting useless warning and inspection which needs to be filtered.
Further, the pc-lint check result output module specifically generates a check result file according to a check filtering condition selected by a user and outputs the check result file to a file path for specification.
Furthermore, when the source code engineering file operating system column selects a system used in the compiling of the source code engineering file, a plurality of systems can be simultaneously selected.
Furthermore, when the option bar of the source code engineering file compiler selects a compiler required by the source code engineering file compilation, a plurality of compilers can be simultaneously selected.
Further, the file detection module classifies the file names in the source code engineering file operating system, the source code engineering file compiler and the source code engineering file into three types, namely a header file, a C file and a library file.
Further, the system used for compiling the source code engineering file comprises a linux system and a windows system.
Further, the compiler includes a gcc compiler and mingw.
Meanwhile, the invention also discloses computer equipment which comprises a memory, a processor and a computer program which is stored in the memory and can run on the processor, wherein the processor realizes the functions of the pc-lint cloud service system based on the cloud platform when executing the computer program.
Meanwhile, the invention also discloses a computer readable storage medium, wherein a computer program is stored in the computer readable storage medium, and when the computer program is executed by a processor, the computer program realizes the functions of the pc-lint cloud service system based on the cloud platform.
Compared with the prior art, the invention has the following beneficial effects:
the invention relates to a pc-lint cloud service system based on a cloud platform, a computer device and a storage medium, the complex process of using the pc-lint by a programmer is simplified to a great extent, the programmer can directly log in an account and upload a source code engineering file to check the source code engineering file through the pc-lint cloud service system, the complex process of downloading the pc-lint and downloading a similar compiler by the programmer using the pc-lint is avoided, meanwhile, the technical scheme of the invention can also be adapted to different programming platforms and compilers, such as a linux system, a windows system, a gcc compiler, a mingw compiler and the like, the accuracy of the pc-lint check can be guaranteed by adapting to different programming platforms and compilers, the enthusiasm of programmers for using the pc-lint is improved finally, and the reliability of programming software is improved.
Drawings
FIG. 1 is a schematic diagram of a pc-lint cloud service system based on a cloud platform according to the present invention.
FIG. 2 is a schematic view of a use flow of the pc-lint cloud service system based on the cloud platform.
Detailed Description
The invention will be further elucidated and described with reference to the embodiments of the invention described hereinafter.
Example (b):
the first embodiment is as follows:
as shown in fig. 1, a pc-lint cloud service system based on a cloud platform includes a client window module and a cloud service system background, which are in communication connection with each other.
Specifically, in this embodiment, the client window module includes a user login unit and a pc-lint use option unit, the user login unit is configured to provide a login entry for a user, the user logs in to the system through the user login unit, and the user can enter the pc-lint use option unit to perform corresponding setting and selection after the client window module successfully logs in.
Specifically, the pc-lint use option unit is composed of a plurality of options, and in this embodiment, the options at least include: a source code engineering file option column, a source code engineering file operation system option column, a source code engineering file compiler option column, a result file output path option column and an inspection result filtering option column.
The source code project file option bar is used for selecting a path where a project file to be detected is located; the source code engineering file operation system option bar is used for selecting a system used during compiling of the source code engineering file; for example, linux, etc., and in this embodiment, the source code engineering file operating system column may be selected more than once, for example, linux and windows, etc. are selected simultaneously. The source code engineering file compiler option bar is used for selecting a compiler required by the compilation of the source code engineering file; for example, gcc, etc., in this embodiment, the source code project file compiler option bar may also be selected more, for example, gcc and mingw, etc. are selected simultaneously. The result file output path option column is used for selecting a specified file path for storing the inspection result file in the local; wherein the pc-lint check result is stored in the check result file. The inspection result filtering option bar is used to filter redundant inspections and some useless warnings among the inspection results, etc.
Specifically, in this embodiment, the cloud service system background at least includes: the device comprises a file mapping module, a file detection module, a pc-lint lnt file generation module, a pc-lint operation module and a pc-lint inspection result output module.
The file mapping module is used for mapping a source code engineering file input by a user from a client to a cloud service system background; the file detection module is used for detecting and classifying file names in a source code engineering file operating system, a source code engineering file compiler and a source code engineering file selected by a user; the file detection module can traverse and check the sub-directories contained in each directory, and the sub-directories are classified into three categories, namely header files, C files and library files.
Specifically, the lnt file generating module of the pc-lint is used for processing the file names which are detected and classified by the file detecting module, generating different pc-lint parameters according to different classifications and storing the parameters into corresponding lnt files; the pc-lint operation module is used for operating the pc-lint according to the lnt file through a command line to check a source code file; and the pc-lint check result output module is used for generating a check result file and outputting the check result file to a specified file path.
Fig. 2 shows an operation method of the pc-lint cloud service system based on the cloud platform, which specifically includes the following steps:
a programmer directly enters a pc-lint cloud service system client through a webpage link, inputs a user name and a password in a login interface provided by a user login unit of a client window module and logs in a pc-lint cloud service system, then a user selects a source code engineering file path needing to be checked locally in a source code engineering file option bar, selects a linux system in a source code engineering file operation system option bar, selects a gcc compiler in a source code engineering file compiler option bar, selects a local desktop in a result file output path option bar, and selects a null in a check result filtering option bar. And then the programmer clicks to start the inspection, waits for the static inspection of the source code engineering file to be completed, and inputs an inspection result file to a desktop.
According to another embodiment of the invention, a programmer can also directly enter a client window module of the system through a webpage link, and inputs a user name and a password on a login page provided by a user login unit to log in a pc-link cloud service system, then a user selects a single source code file path which needs to be checked locally in a source code engineering file option bar, selects a windows system in a source code engineering file operation system option bar, selects a mingw compiler in a source code engineering file compiler option bar, selects a local desktop in a result file output path option bar, and selects a number-e 10 which needs to be filtered in a check result filtering option bar. And then the programmer clicks to start the inspection, waits for the static inspection of the source code engineering file to be completed, and inputs an inspection result file to a desktop.
According to another embodiment of the invention, a programmer directly enters a client window module of a pc-lin t cloud service system through a webpage link, inputs a user name and a password on a login page provided by a user login unit to log in the pc-lin t cloud service system, then a user selects a source code engineering file path which needs to be checked locally in a source code engineering file option bar, selects windows and linux systems in a source code engineering file operation system option bar, selects a mingw compiler and a gcc compiler in a source code engineering file compiler option bar, selects a local desktop in a result file output path option bar, and selects a number-e 10 which needs to be filtered in an inspection result filtering option bar. And then the programmer clicks to start the inspection, waits for the static inspection of the source code engineering file to be completed, and inputs an inspection result file to a desktop.
In conclusion, through the pc-lint cloud service system provided by the invention, when in use, a programmer can perform static check on codes only by entering the system through a link to input a user name and a password to log in, the programmer is not required to download and install the pc-lint by himself, and in the use process, a source code engineering file operation system can be selected on a client page, multiple selections can be performed, multiple programming environments are adapted, compilers in different environments are adapted, the use process of the pc-lint is simplified to a great extent, the enthusiasm of the programmer in using the pc-lint is improved, and the code standardization and the program reliability are enhanced.
Example two
The embodiment discloses computer equipment, which comprises a memory, a processor and a computer program which is stored in the memory and can run on the processor, wherein the processor realizes the functions of the pc-lint cloud service system based on the cloud platform of the first embodiment when executing the computer program.
Meanwhile, the embodiment also discloses a computer readable storage medium, wherein a computer program is stored in the computer readable storage medium, and when the computer program is executed by a processor, the computer program realizes the functions of the pc-lint cloud service system based on the cloud platform in the first embodiment.
It will be understood that the above embodiments are merely exemplary embodiments taken to illustrate the principles of the present invention, which is not limited thereto. It will be apparent to those skilled in the art that various modifications and improvements can be made without departing from the spirit and substance of the invention, and these modifications and improvements are also considered to be within the scope of the invention.

Claims (9)

1. A pc-lint cloud service system based on a cloud platform is characterized by comprising a client window module and a cloud service system background which are in communication connection with each other;
the client window module comprises a user login unit and a pc-lint use option unit, the user login unit is used for providing a login entry for a user, the pc-lint use option unit is composed of a plurality of options, and the options at least comprise:
the source code project file option bar is used for selecting a path where a project file to be detected is located;
the source code engineering file operation system option bar is used for selecting a system used during compiling the source code engineering file;
the source code engineering file compiler option bar is used for selecting a compiler required by compiling the source code engineering file;
a result file output path option bar used for selecting the specified file path of the check result file stored in the local; the pc-lint check result is stored in the check result file;
the cloud service system background at least comprises:
the file mapping module is used for mapping the source code engineering file input by the user from the client to the cloud service system background;
the file detection module is used for detecting and classifying file names in a source code engineering file operating system, a source code engineering file compiler and a source code engineering file selected by a user; the file detection module traverses and checks the subdirectories contained in each directory, and the subdirectories are classified into three categories, namely header files, C files and library files;
the lnt file generating module of the pc-lint is used for processing the file names which are detected and classified by the file detecting module, generating different pc-lint parameters according to different classifications and storing the parameters into corresponding lnt files;
the pc-lint operation module is used for operating the pc-lint according to the lnt file through a command line to check a source code file;
and the pc-lint check result output module is used for generating a check result file and outputting the check result file to a specified file path.
2. The cloud platform-based pc-lint cloud service system according to claim 1, wherein the option bar further comprises: and an inspection result filtering option column for selecting inspection filtering conditions, including selecting useless warning and inspection which needs to be filtered.
3. The cloud platform-based pc-lint cloud service system according to claim 2, wherein the pc-lint inspection result output module specifically generates an inspection result file according to an inspection filtering condition selected by a user and outputs the inspection result file to a file path for specification.
4. The pc-lint cloud service system based on the cloud platform of claim 1, wherein when the source code project file operating system column selects a system used in compiling the source code project file, a plurality of systems can be selected at the same time.
5. The cloud platform-based pc-lint cloud service system according to claim 1, wherein when the source code engineering file compiler option bar selects a compiler required for compiling the source code engineering file, a plurality of compilers can be selected at the same time.
6. The pc-lint cloud service system based on the cloud platform of any of claims 1 to 5, wherein the system used for compiling the source code engineering file comprises a linux system and a windows system.
7. The cloud platform-based pc-lint cloud service system according to any of claims 1 to 5, wherein the compiler comprises a gcc compiler and mingw.
8. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor when executing the computer program implements the functionality of the cloud platform based pc-lint cloud service system as claimed in any of claims 1 to 7.
9. A computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the functions of the cloud platform based pc-lint cloud service system according to any one of claims 1 to 7.
CN202011124866.5A 2020-10-20 2020-10-20 Pc-lint cloud service system based on cloud platform, computer equipment and storage medium Active CN112346967B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011124866.5A CN112346967B (en) 2020-10-20 2020-10-20 Pc-lint cloud service system based on cloud platform, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011124866.5A CN112346967B (en) 2020-10-20 2020-10-20 Pc-lint cloud service system based on cloud platform, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN112346967A CN112346967A (en) 2021-02-09
CN112346967B true CN112346967B (en) 2022-03-01

Family

ID=74358339

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011124866.5A Active CN112346967B (en) 2020-10-20 2020-10-20 Pc-lint cloud service system based on cloud platform, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112346967B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104572237A (en) * 2015-01-19 2015-04-29 上海动联信息技术股份有限公司 Automatic quick generation system and method for UKey installation package
CN108491227A (en) * 2018-03-09 2018-09-04 深圳市富途网络科技有限公司 A kind of security configuration system and method based on lua and redis
CN109446107A (en) * 2019-01-23 2019-03-08 长沙软工信息科技有限公司 A kind of source code detection method and device, electronic equipment

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE102006046203A1 (en) * 2006-09-29 2007-08-30 Siemens Ag Software source code evaluating method, involves classifying detected errors, assigning errors to error class from set of error classes, and assigning specification, which specifies errors of respective error classes to each error class
CN101650653A (en) * 2009-09-04 2010-02-17 中兴通讯股份有限公司 Daily constructing method and device
CN102968367A (en) * 2012-08-28 2013-03-13 华南理工大学 Static detection method on basis of embedded software and system thereof
CN105912458A (en) * 2016-03-28 2016-08-31 中国电力科学研究院 Method and system for dynamically detecting C/C++ memory leak
FR3050598B1 (en) * 2016-04-26 2020-11-06 Bcom PROCESS FOR DECODING A DIGITAL IMAGE, PROCESS FOR CODING, DEVICES, AND ASSOCIATED COMPUTER PROGRAMS
CN106250319B (en) * 2016-08-15 2018-02-27 腾讯科技(深圳)有限公司 Static code scanning result treating method and apparatus
CN111552476A (en) * 2020-04-24 2020-08-18 烽火通信科技股份有限公司 Method and equipment for static code inspection

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104572237A (en) * 2015-01-19 2015-04-29 上海动联信息技术股份有限公司 Automatic quick generation system and method for UKey installation package
CN108491227A (en) * 2018-03-09 2018-09-04 深圳市富途网络科技有限公司 A kind of security configuration system and method based on lua and redis
CN109446107A (en) * 2019-01-23 2019-03-08 长沙软工信息科技有限公司 A kind of source code detection method and device, electronic equipment

Also Published As

Publication number Publication date
CN112346967A (en) 2021-02-09

Similar Documents

Publication Publication Date Title
US7954009B2 (en) Test executive system with memory leak detection for user code modules
CN103793326A (en) Assembly test method and device
US20130061210A1 (en) Interactive debugging environments and methods of providing the same
CN110197072B (en) Method and system for discovering software security vulnerability, storage medium and computer equipment
CN109522010B (en) Initialization code adding method and device, storage medium and electronic equipment
CN110543423A (en) software dependence package capability detection method, system and medium
CN112241360A (en) Test case generation method, device, equipment and storage medium
CN112346967B (en) Pc-lint cloud service system based on cloud platform, computer equipment and storage medium
CN114218882A (en) SoC chip inspection method, device and related equipment
CN106776231A (en) Android crash logs optimization method and system based on Git
CN110286912B (en) Code detection method and device and electronic equipment
CN111222141B (en) Automobile electronic control unit code vulnerability analysis method and system
CN111831554A (en) Code checking method and device
CN102169458A (en) Software accuracy verification system and method for automobile electric control component
CN114564002B (en) Method and device for quickly diagnosing lost packet and computer equipment
CN114168108A (en) Code merging method and device, electronic equipment and computer readable storage medium
CN110795142B (en) Configuration file generation method and device
EP0801348A1 (en) Method of monitoring the operation of a computer
CN114116471A (en) Automatic code scanning method, system, electronic equipment and storage medium
CN112631944A (en) Source code detection method and device based on abstract syntax tree and computer storage medium
CN116541270B (en) Method and device for testing adaptation verification of operating system
CN115168175A (en) Program error solving method, device, electronic equipment and storage medium
CN114115168A (en) Fault injection test system
CN112558982A (en) Code detection method and device and computer equipment
Tekinerdogan et al. Test suite assessment of safety-critical systems using safety tactics and fault-based mutation testing

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant