{"json_modified": "2016-09-21T13:55:09.427412", "uuid": "2dccf2d8-cee1-4430-95e1-50ef5884a015", "title": "Coding style", "url": "/en-US/docs/Mozilla/Developer_guide/Coding_Style", "tags": ["Firefox", "Beginner", "Guide", "Mozilla", "Developing Mozilla", "beginner"], "translations": [{"uuid": "f32e0033-22b2-4416-b775-a57699d48307", "title": "Mozilla \u30b3\u30fc\u30c7\u30a3\u30f3\u30b0\u30b9\u30bf\u30a4\u30eb\u30ac\u30a4\u30c9", "url": "/ja/docs/Mozilla/Developer_Guide/Mozilla_Coding_Style_Guide", "tags": ["Firefox", "Beginner", "Guide", "Mozilla", "Developing Mozilla", "beginner"], "summary": "\u3053\u306e\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u306f Mozilla \u30b3\u30fc\u30c9\u30d9\u30fc\u30b9\u3067\u4f7f\u308f\u308c\u308b\u57fa\u672c\u30b9\u30bf\u30a4\u30eb\u3068\u30d1\u30bf\u30fc\u30f3\u3092\u8aac\u660e\u3059\u308b\u305f\u3081\u306e\u3082\u306e\u3067\u3059\u3002 \u65b0\u3057\u3044\u30b3\u30fc\u30c9\u306f\u3053\u308c\u3089\u306e\u6a19\u6e96\u306b\u6cbf\u3046\u3088\u3046\u8a66\u307f\u308b\u3079\u304d\u3067\u3059\u3002\u305d\u308c\u306f\u3001\u65e2\u5b58\u306e\u30b3\u30fc\u30c9\u540c\u69d8\u306b\u30e1\u30f3\u30c6\u30ca\u30f3\u30b9\u304c\u697d\u306b\u306a\u308b\u305f\u3081\u3067\u3059\u3002 \u3082\u3061\u308d\u3093\u3001\u3069\u306e\u30eb\u30fc\u30eb\u306b\u3082\u4f8b\u5916\u306f\u3042\u308a\u307e\u3059\u3002\u3057\u304b\u3057\u3001\u306b\u3082\u304b\u304b\u308f\u3089\u305a\u30eb\u30fc\u30eb\u3092\u77e5\u308b\u3053\u3068\u306f\u91cd\u8981\u306a\u306e\u3067\u3059\uff01", "localization_tags": [], "locale": "ja", "last_edit": "2016-04-28T00:39:06", "review_tags": []}, {"uuid": "6fa8efe4-8140-4cad-9775-6c3d70af63e6", "title": "Coding Style", "url": "/ru/docs/Developer_Guide/Coding_Style", "tags": [], "summary": "\u042d\u0442\u043e\u0442 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442 \u043e\u0431\u044a\u044fc\u043d\u044f\u0435\u0442 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u0441\u0442\u0438\u043b\u0438 \u0438 \u0448\u0430\u0431\u043b\u043e\u043d\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0432 \u043a\u043e\u0434\u0435 Mozilla.\u00a0\u041d\u043e\u0432\u044b\u0439 \u043a\u043e\u0434 \u0434\u043e\u043b\u0436\u0435\u043d \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u0438\u043c \u043d\u043e\u0440\u043c\u0430\u043c, \u0447\u0442\u043e\u0431\u044b \u0431\u044b\u043b\u043e \u043f\u0440\u043e\u0449\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u043a\u043e\u0434.\u00a0\u041a\u043e\u043d\u0435\u0447\u043d\u043e, \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435, \u043d\u043e \u0442\u0435\u043c \u043d\u0435 \u043c\u0435\u043d\u0435\u0435\u00a0\u0432\u0430\u0436\u043d\u043e \u0437\u043d\u0430\u0442\u044c \u044d\u0442\u0438 \u043f\u0440\u0430\u0432\u0438\u043b\u0430!", "localization_tags": ["inprogress"], "locale": "ru", "last_edit": "2016-07-19T00:52:53", "review_tags": []}, {"uuid": "bf56d851-108b-4477-a00b-646253a9db68", "title": "\u7f16\u7801\u98ce\u683c", "url": "/zh-CN/docs/Mozilla/Developer_guide/Coding_Style", "tags": [], "summary": "\u672c\u6587\u5c06\u8bd5\u56fe\u4ecb\u7ecd\u5728Mozilla\u7684\u4ee3\u7801\u5e93\u4e2d\u4f7f\u7528\u7684\u57fa\u672c\u98ce\u683c\u548c\u6a21\u5f0f\u3002\u4e3a\u4e86\u65b9\u4fbf\u7684\u7ef4\u62a4\u73b0\u5b58\u7684\u4ee3\u7801\uff0c \u65b0\u4ee3\u7801\u5e94\u8be5\u5c3d\u91cf\u7b26\u5408\u8fd9\u4e9b\u6807\u51c6\u3002\u5f53\u7136\uff0c\u6bcf\u4e2a\u89c4\u5219\u90fd\u6709\u4f8b\u5916\uff0c\u4f46\u719f\u6089\u89c4\u5219\u4ecd\u662f\u5341\u5206\u91cd\u8981\u7684\u3002", "localization_tags": ["inprogress"], "locale": "zh-CN", "last_edit": "2014-07-15T17:42:24", "review_tags": []}], "modified": "2016-09-21T13:55:08", "label": "Coding style", "localization_tags": [], "locale": "en-US", "id": 416, "last_edit": "2016-09-21T13:55:03", "summary": "This document attempts to explain the basic styles and patterns that are used in the Mozilla codebase. New code should try to conform to these standards so that it is as easy to maintain as existing code. Of course every rule has an exception, but it's important to know the rules nonetheless!", "sections": [{"id": "Naming_and_Formatting_code", "title": "Naming and formatting code"}, {"id": "Whitespace", "title": "Whitespace"}, {"id": "Line_Length", "title": "Line length"}, {"id": "Indentation", "title": "Indentation"}, {"id": "Control_Structures", "title": "Control structures"}, {"id": "Namespaces", "title": "C++ namespaces"}, {"id": "Anonymous_namespaces", "title": "Anonymous namespaces"}, {"id": "Classes", "title": "C++ classes\u00a0"}, {"id": "Methods", "title": "Methods and functions"}, {"id": "CC", "title": "C/C++"}, {"id": "JavaScript", "title": "JavaScript"}, {"id": "JavaScript_objects", "title": "JavaScript objects"}, {"id": "Mode_Line", "title": "Mode line"}, {"id": "Declarations", "title": "Declarations"}, {"id": "Operators", "title": "Operators"}, {"id": "Literals", "title": "Literals"}, {"id": "Prefixes", "title": "Prefixes"}, {"id": "Variable_prefixes", "title": "Variable prefixes"}, {"id": "Global_functions.2Fmacros.2Fetc", "title": "Global functions/macros/etc"}, {"id": "Error_Variables", "title": "Error Variables"}, {"id": "General_C.2FC.2B.2B_Practices", "title": "General practices"}, {"id": "CC_practices", "title": "C/C++ practices"}, {"id": "JavaScript_practices", "title": "JavaScript practices"}, {"id": "Java_practices", "title": "Java practices"}, {"id": "Makefile_moz.build_practices", "title": "Makefile/moz.build practices"}, {"id": "Python_Practices", "title": "Python practices"}, {"id": "SVG_practices", "title": "SVG practices"}, {"id": "COM_and_pointers", "title": "COM, pointers and strings"}, {"id": "IDL", "title": "IDL"}, {"id": "Use_leading-lowercase.2C_or_.22interCaps.22", "title": "Use leading-lowercase, or \"interCaps\""}, {"id": "Use_attributes_wherever_possible", "title": "Use attributes wherever possible"}, {"id": "Use_java-style_constants", "title": "Use Java-style constants"}, {"id": "See_also", "title": "See also"}, {"id": "Error_handling", "title": "Error handling"}, {"id": "Check_for_errors_early_and_often", "title": "Check for errors early and often"}, {"id": "Use_the_nice_macros", "title": "Use the NS_WARN_IF macro when errors are unexpected."}, {"id": "Return_from_errors_immediately", "title": "Return from errors immediately"}, {"id": "Strings", "title": "C++ strings"}, {"id": "Use_the_Auto_form_of_strings_for_local_values", "title": "Use the "}, {"id": "Be_wary_of_leaking_values_from_non-XPCOM_functions_that_return_char.2A_or_PRUnichar.2A", "title": "Be wary of leaking values from non-XPCOM functions that return char* or PRUnichar*"}, {"id": "Use_NS_LITERAL_STRING.28.29_to_avoid_runtime_string_conversion", "title": "Use MOZ_UTF16() or NS_LITERAL_STRING() to avoid runtime string conversion"}, {"id": "Usage_of_PR_(MAXMINABSROUNDUP)_macro_calls", "title": "Usage of PR_(MAX|MIN|ABS|ROUNDUP) macro calls"}], "slug": "Mozilla/Developer_guide/Coding_Style", "review_tags": []}