Skip to content

Commit

Permalink
Merge pull request #2340 from hzeller/feature-20250121-add-boilerplate
Browse files Browse the repository at this point in the history
Add boilerplate such as license header and docstring to module-versio…
  • Loading branch information
hzeller authored Jan 21, 2025
2 parents aadb25c + cbf381c commit e90ef18
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 5 deletions.
2 changes: 1 addition & 1 deletion verible/common/formatting/layout-optimizer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
#include <ostream>
#include <utility>

#include "absl/base/config.h" // for ABSL_LTS_RELEASE_VERSION
#include "absl/base/config.h" // NOLINT for ABSL_LTS_RELEASE_VERSION
#include "absl/container/fixed_array.h"
#include "absl/log/log.h"
#include "verible/common/formatting/basic-format-style.h"
Expand Down
2 changes: 1 addition & 1 deletion verible/common/lsp/lsp-file-utils.cc
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#include <string>
#include <string_view>

#include "absl/base/config.h" // for ABSL_LTS_RELEASE_VERSION
#include "absl/base/config.h" // NOLINT for ABSL_LTS_RELEASE_VERSION
#include "absl/strings/escaping.h"
#include "absl/strings/match.h"
#include "absl/strings/str_cat.h"
Expand Down
18 changes: 17 additions & 1 deletion verible/common/util/module-version.bzl
Original file line number Diff line number Diff line change
@@ -1,4 +1,20 @@
def get_version_define_from_module():
# Copyright 2025 The Verible Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

"""Provide a helper function to extract version number from MODULE.bazel"""

def get_version_define_from_module(name = ""):
module_version = native.module_version()
if module_version:
return ['-DVERIBLE_MODULE_VERSION=\\"{0}\\"'.format(module_version)]
Expand Down
2 changes: 1 addition & 1 deletion verible/verilog/analysis/verilog-linter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#include <utility>
#include <vector>

#include "absl/base/config.h" // for ABSL_LTS_RELEASE_VERSION
#include "absl/base/config.h" // NOLINT for ABSL_LTS_RELEASE_VERSION
#include "absl/flags/flag.h"
#include "absl/log/log.h"
#include "absl/status/status.h"
Expand Down
2 changes: 1 addition & 1 deletion verible/verilog/tools/ls/symbol-table-handler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#include <string_view>
#include <vector>

#include "absl/base/config.h" // for ABSL_LTS_RELEASE_VERSION
#include "absl/base/config.h" // NOLINT for ABSL_LTS_RELEASE_VERSION
#include "absl/container/flat_hash_map.h"
#include "absl/flags/flag.h"
#include "absl/log/log.h"
Expand Down

0 comments on commit e90ef18

Please sign in to comment.