Skip to content

Instantly share code, notes, and snippets.

@TalkedDevotee
Last active December 21, 2017 21:32
Show Gist options
  • Save TalkedDevotee/4021658baef5c9b48009327f57fe68c2 to your computer and use it in GitHub Desktop.
Save TalkedDevotee/4021658baef5c9b48009327f57fe68c2 to your computer and use it in GitHub Desktop.
lab15

Laboratory work XV

Данная лабораторная работа посвещена изучению инструментов статического и динамического анализа кода

$ open http://cppcheck.sourceforge.net

Tasks

  • 1. Ознакомиться со ссылками учебного материала
  • 2. Используя cpplint провести анализ проекта на C++
  • 3. Используя Cppcheck провести анализ проекта на C++
  • 4. Используя OCLint провести анализ проекта на C++
  • 5. Используя Valgrind провести анализ проекта на C++
  • 6. Составить отчет и отправить ссылку личным сообщением в Slack

cpplint

$ cpplint test.cpp
Done processing test.cpp

cppcheck

$ cppcheck test.cpp
Checking test.cpp...

OCLint

$ oclint test.cpp -- -c


OCLint Report

Summary: TotalFiles=1 FilesWithViolations=0 P1=0 P2=0 P3=0 


[OCLint (http://oclint.org) v0.13]

Valgrind

$ valgrind ./test
==23275== Memcheck, a memory error detector
==23275== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==23275== Using Valgrind-3.13.0 and LibVEX; rerun with -h for copyright info
==23275== Command: ./test
==23275== 
Hello world!
==23275== 
==23275== HEAP SUMMARY:
==23275==     in use at exit: 72,704 bytes in 1 blocks
==23275==   total heap usage: 2 allocs, 1 frees, 73,728 bytes allocated
==23275== 
==23275== LEAK SUMMARY:
==23275==    definitely lost: 0 bytes in 0 blocks
==23275==    indirectly lost: 0 bytes in 0 blocks
==23275==      possibly lost: 0 bytes in 0 blocks
==23275==    still reachable: 72,704 bytes in 1 blocks
==23275==         suppressed: 0 bytes in 0 blocks
==23275== Rerun with --leak-check=full to see details of leaked memory
==23275== 
==23275== For counts of detected and suppressed errors, rerun with: -v
==23275== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)

Links

Copyright (c) 2017 Братья Вершинины
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment