Skip to content

Commit

Permalink
Merge pull request #25961 from JuliaLang/aa/license-headers
Browse files Browse the repository at this point in the history
Add license headers to files without them
  • Loading branch information
JeffBezanson authored Feb 9, 2018
2 parents c1e1e84 + 06dd5d9 commit 27c7790
Show file tree
Hide file tree
Showing 42 changed files with 79 additions and 8 deletions.
2 changes: 2 additions & 0 deletions base/compiler/utilities.jl
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# This file is a part of Julia. License is MIT: https://julialang.org/license

###########
# generic #
###########
Expand Down
2 changes: 2 additions & 0 deletions base/reinterpretarray.jl
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# This file is a part of Julia. License is MIT: https://julialang.org/license

"""
Gives a reinterpreted view (of element type T) of the underlying array (of element type S).
If the size of `T` differs from the size of `S`, the array will be compressed/expanded in
Expand Down
2 changes: 2 additions & 0 deletions base/special/exp10.jl
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# This file is a part of Julia. License is MIT: https://julialang.org/license

# Method
# 1. Argument reduction: Reduce x to an r so that |r| <= 0.5*log10(2). Given x,
# find r and integer k such that
Expand Down
14 changes: 7 additions & 7 deletions contrib/add_license_to_files.jl
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ const rootdirs = [
"../contrib",
"../examples",
"../src",
"../stdlib",
"../test",
]

Expand All @@ -35,7 +36,6 @@ const skipfiles = [
"../base/special/trig.jl",
"../base/special/exp.jl",
"../base/special/rem_pio2.jl",
"../base/linalg/givens.jl",
#
"../src/abi_llvm.cpp",
"../src/abi_ppc64le.cpp",
Expand Down Expand Up @@ -63,11 +63,11 @@ const skipfiles = [
]

const ext_prefix = Dict([
(".jl", "# "),
(".sh", "# "),
(".h", "\/\/ "),
(".c", "\/\/ "),
(".cpp", "\/\/ "),
(".jl", "# "),
(".sh", "# "),
(".h", "// "),
(".c", "// "),
(".cpp", "// "),
])

const new_license = "This file is a part of Julia. License is MIT: https://julialang.org/license"
Expand Down Expand Up @@ -136,7 +136,7 @@ function add_license_line!(unprocessed::Vector, src::AbstractString, new_license
if ext in keys(ext_prefix)
prefix = ext_prefix[ext]
f = open(path, "r")
lines = readlines(f, chomp=false)
lines = readlines(f, keep=true)
close(f)
isempty(lines) && (push!(unprocessed, path); continue)
isempty(old_license) || check_lines!(path, lines, old_license, prefix, true)
Expand Down
1 change: 1 addition & 0 deletions examples/clustermanager/simple/UnixDomainCM.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# This file is a part of Julia. License is MIT: https://julialang.org/license

using Distributed
import Distributed: launch, manage, connect, exit

Expand Down
1 change: 1 addition & 0 deletions examples/clustermanager/simple/test_simple.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# This file is a part of Julia. License is MIT: https://julialang.org/license

using Distributed
cmanpath = joinpath(@__DIR__, "UnixDomainCM.jl")
include(cmanpath)
Expand Down
2 changes: 2 additions & 0 deletions examples/embedding/LocalModule.jl
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# This file is a part of Julia. License is MIT: https://julialang.org/license

__precompile__()
module LocalModule

Expand Down
1 change: 1 addition & 0 deletions src/llvm-gc-invariant-verifier.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// This file is a part of Julia. License is MIT: https://julialang.org/license

// This LLVM pass verifies invariants required for correct GC root placement.
// See the devdocs for a description of these invariants.

Expand Down
2 changes: 2 additions & 0 deletions src/support/analyzer_annotations.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// This file is a part of Julia. License is MIT: https://julialang.org/license

#ifdef __clang_analyzer__

#define JL_PROPAGATES_ROOT __attribute__((annotate("julia_propagates_root")))
Expand Down
1 change: 1 addition & 0 deletions stdlib/CRC32c/src/CRC32c.jl
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# This file is a part of Julia. License is MIT: https://julialang.org/license

__precompile__(true)

Expand Down
2 changes: 2 additions & 0 deletions stdlib/CRC32c/test/runtests.jl
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# This file is a part of Julia. License is MIT: https://julialang.org/license

using Test, Random
using CRC32c

Expand Down
2 changes: 2 additions & 0 deletions stdlib/Dates/src/deprecated.jl
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# This file is a part of Julia. License is MIT: https://julialang.org/license

# 0.7 deprecations

import Base.colon
Expand Down
2 changes: 1 addition & 1 deletion stdlib/Dates/test/adjusters.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#This file is a part of Julia. License is MIT: https://julialang.org/license
# This file is a part of Julia. License is MIT: https://julialang.org/license

module AdjustersTest

Expand Down
1 change: 1 addition & 0 deletions stdlib/Dates/test/runtests.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# This file is a part of Julia. License is MIT: https://julialang.org/license

module DateTests

for file in readlines(joinpath(@__DIR__, "testgroups"))
Expand Down
2 changes: 2 additions & 0 deletions stdlib/LibGit2/src/deprecated.jl
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# This file is a part of Julia. License is MIT: https://julialang.org/license

# BEGIN 0.7 deprecations

# PR #22062
Expand Down
2 changes: 2 additions & 0 deletions stdlib/LibGit2/src/gitcredential.jl
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# This file is a part of Julia. License is MIT: https://julialang.org/license

"""
GitCredential
Expand Down
1 change: 1 addition & 0 deletions stdlib/LibGit2/test/libgit2.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# This file is a part of Julia. License is MIT: https://julialang.org/license

module LibGit2Tests

import LibGit2
Expand Down
1 change: 1 addition & 0 deletions stdlib/LibGit2/test/online.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# This file is a part of Julia. License is MIT: https://julialang.org/license

module LibGit2OnlineTests

using Test
Expand Down
2 changes: 2 additions & 0 deletions stdlib/LibGit2/test/runtests.jl
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
# This file is a part of Julia. License is MIT: https://julialang.org/license

include("libgit2.jl")
include("online.jl")
1 change: 1 addition & 0 deletions stdlib/LinearAlgebra/src/givens.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# This file is a part of Julia. License is MIT: https://julialang.org/license

# givensAlgorithm functions are derived from LAPACK, see below

abstract type AbstractRotation{T} end
Expand Down
2 changes: 2 additions & 0 deletions stdlib/Logging/test/runtests.jl
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# This file is a part of Julia. License is MIT: https://julialang.org/license

using Logging

import Logging: min_enabled_level, shouldlog, handle_message
Expand Down
2 changes: 2 additions & 0 deletions stdlib/Pkg/test/runtests.jl
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
# This file is a part of Julia. License is MIT: https://julialang.org/license

include("pkg.jl")
include("resolve.jl")
2 changes: 2 additions & 0 deletions stdlib/REPL/src/docview.jl
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# This file is a part of Julia. License is MIT: https://julialang.org/license

## Code for searching and viewing documentation

using Markdown
Expand Down
2 changes: 2 additions & 0 deletions stdlib/REPL/src/precompile.jl
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# This file is a part of Julia. License is MIT: https://julialang.org/license

function _precompile_()
ccall(:jl_generating_output, Cint, ()) == 1 || return nothing
precompile(Tuple{typeof(Base.__atreplinit), REPL.LineEditREPL})
Expand Down
2 changes: 2 additions & 0 deletions stdlib/REPL/test/FakeTerminals.jl
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# This file is a part of Julia. License is MIT: https://julialang.org/license

module FakeTerminals

import REPL
Expand Down
1 change: 1 addition & 0 deletions stdlib/REPL/test/repl.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# This file is a part of Julia. License is MIT: https://julialang.org/license

using Test
using REPL
using Random
Expand Down
2 changes: 2 additions & 0 deletions stdlib/REPL/test/runtests.jl
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# This file is a part of Julia. License is MIT: https://julialang.org/license

module REPLTests
include("repl.jl")
end
Expand Down
2 changes: 2 additions & 0 deletions stdlib/Serialization/src/precompile.jl
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# This file is a part of Julia. License is MIT: https://julialang.org/license

precompile(Tuple{typeof(Serialization.write_as_tag), Base.TCPSocket, Int32})
precompile(Tuple{typeof(Serialization.object_number), Core.TypeName})
precompile(Tuple{typeof(Serialization.serialize_array_data), Base.TCPSocket, Array{Int64, 1}})
Expand Down
2 changes: 2 additions & 0 deletions stdlib/UUIDs/src/UUIDs.jl
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# This file is a part of Julia. License is MIT: https://julialang.org/license

module UUIDs

using Random
Expand Down
2 changes: 2 additions & 0 deletions stdlib/UUIDs/test/runtests.jl
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# This file is a part of Julia. License is MIT: https://julialang.org/license

using UUIDs, Random

u1 = uuid1()
Expand Down
2 changes: 2 additions & 0 deletions test/depot/packages/9HkB/TCSb/src/Baz.jl
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# This file is a part of Julia. License is MIT: https://julialang.org/license

__precompile__(true)
module Baz
import Foo, Qux
Expand Down
2 changes: 2 additions & 0 deletions test/depot/packages/SXm7/WLVn/src/Foo.jl
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# This file is a part of Julia. License is MIT: https://julialang.org/license

__precompile__(true)
module Foo
import Bar, Baz, Qux
Expand Down
2 changes: 2 additions & 0 deletions test/deprecation_exec.jl
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# This file is a part of Julia. License is MIT: https://julialang.org/license

# Tests for deprecated functionality.
#
# These can't be run with --depwarn=error, so currently require special
Expand Down
2 changes: 2 additions & 0 deletions test/llvmpasses/alloc-opt.jl
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# This file is a part of Julia. License is MIT: https://julialang.org/license

# RUN: julia --startup-file=no %s | opt -load libjulia.so -AllocOpt -LateLowerGCFrame -S - | FileCheck %s

isz = sizeof(UInt) == 8 ? "i64" : "i32"
Expand Down
2 changes: 2 additions & 0 deletions test/llvmpasses/alloc-opt2.jl
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# This file is a part of Julia. License is MIT: https://julialang.org/license

# RUN: julia --startup-file=no %s | opt -load libjulia.so -AllocOpt -S - | FileCheck %s

isz = sizeof(UInt) == 8 ? "i64" : "i32"
Expand Down
2 changes: 2 additions & 0 deletions test/llvmpasses/safepoint_stress.jl
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# This file is a part of Julia. License is MIT: https://julialang.org/license

# RUN: julia --startup-file=no %s | opt -load libjulia.so -LateLowerGCFrame -S - | FileCheck %s

println("""
Expand Down
2 changes: 2 additions & 0 deletions test/project/deps/Bar/src/Bar.jl
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# This file is a part of Julia. License is MIT: https://julialang.org/license

__precompile__(true)
module Bar
import Baz, Foo
Expand Down
2 changes: 2 additions & 0 deletions test/project/deps/Foo1/src/Foo.jl
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# This file is a part of Julia. License is MIT: https://julialang.org/license

__precompile__(true)
module Foo
import Bar, Baz, Qux
Expand Down
2 changes: 2 additions & 0 deletions test/project/deps/Foo2.jl/src/Foo.jl
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# This file is a part of Julia. License is MIT: https://julialang.org/license

__precompile__(true)
module Foo
import Qux
Expand Down
2 changes: 2 additions & 0 deletions test/project/deps/Qux.jl
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# This file is a part of Julia. License is MIT: https://julialang.org/license

__precompile__(true)
module Qux
this = "Qux"
Expand Down
2 changes: 2 additions & 0 deletions test/reinterpretarray.jl
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# This file is a part of Julia. License is MIT: https://julialang.org/license

using Test

A = Int64[1, 2, 3, 4]
Expand Down
2 changes: 2 additions & 0 deletions test/specificity.jl
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# This file is a part of Julia. License is MIT: https://julialang.org/license

function args_morespecific(a, b)
sp = (ccall(:jl_type_morespecific, Cint, (Any,Any), a, b) != 0)
if sp # make sure morespecific(a,b) implies !morespecific(b,a)
Expand Down

0 comments on commit 27c7790

Please sign in to comment.