Skip to Content
Googleのソフトウェアエンジニアリング ―持続可能なプログラミングを支える技術、文化、プロセス
book

Googleのソフトウェアエンジニアリング ―持続可能なプログラミングを支える技術、文化、プロセス

by Titus Winters, Tom Manshreck, Hyrum Wright, 竹辺 靖昭, 久富木 隆一
November 2021
Intermediate to advanced
684 pages
10h 37m
Japanese
O'Reilly Japan, Inc.
Content preview from Googleのソフトウェアエンジニアリング ―持続可能なプログラミングを支える技術、文化、プロセス

20章静的解析

Caitlin Sadowski 著

Lisa Carey 編

 静的解析(static analysis)とは、ソースコードを解析して、バグ、アンチパターン、その他の課題等、そのプログラムを実行せずに原因が究明可能である潜在的な問題を見つけるプログラムを指す。「静的」の部分は、プログラムの実行(「動的(dynamic)」解析と呼ばれる)を行わずにソースコードを解析することを特に指している。静的解析は、プログラム内のバグを、本番環境のコードとしてチェックインされる前に早期に発見できる。静的解析が特定できる問題は、例えば、オーバーフローする定数式†1、絶対に実行されないテスト、ログ取得文内に入っている実行時にクラッシュする不正な書式文字列等だ†2。しかし静的解析が役に立つ用途は単なるバグ発見だけにとどまらない。Googleでは静的解析を通じて、ベストプラクティスをコード化し、コードが現代的なAPIバージョンへ合わせて更新され続けるよう促し、技術的負債を防ぐかあるいは減らす。そのような解析の例には、命名規約が維持されていることの検証、廃止されたAPIの利用箇所へのフラグ付け、コードを読みやすくするさらに単純な同値の式の指摘、等がある。静的解析はAPI廃止プロセスで不可欠なツールでもある。API廃止プロセスでは、新APIへのコードベース移行の最中に、廃止されるAPIへの後戻りを静的解析によって防げる(22章参照)。さらに我々は、静的解析のチェックがあることで、開発者を教育でき、またコードベースにアンチパターンが入り込むことを実際に防げるというエビデンスも見つけている†3

†1 訳注:例えばJavaでは、整数リテラルにLをつけないとlongではなくintとして扱われるため、計算内容によってはintの表現範囲を超えて定数式がオーバーフローしやすくなる。 ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

サイトリライアビリティワークブック ―SREの実践方法

サイトリライアビリティワークブック ―SREの実践方法

Betsy Beyer, Niall Richard Murphy, David K. Rensin, Kent Kawahara, Stephen Thorne, 澤田 武男, 関根 達夫, 細川 一茂, 矢吹 大輔, 玉川 竜司
初めてのSQL 第3版

初めてのSQL 第3版

Alan Beaulieu, 株式会社クイープ
プログラミングRust

プログラミングRust

Jim Blandy, Jason Orendorff, 中田 秀基
仕事ではじめる機械学習 第2版

仕事ではじめる機械学習 第2版

有賀 康顕, 中山 心太, 西林 孝

Publisher Resources

ISBN: 9784873119656Other